Skip to content

This repository accompanies the article "UIKit Is Not Dead: Why We Still Use It for Navigation" and contains two internal SwiftUI navigation experiments.

Notifications You must be signed in to change notification settings

strvcom/swiftui-navigation-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

UIKit Is Not Dead: Navigation Experiments

This repository accompanies the article "UIKit Is Not Dead: Why We Still Use It for Navigation" and contains two internal SwiftUI navigation experiments.

Projects

Solution1 - Wrapper-Based Bridge to SwiftUI Navigation

This prototype tries to bridge imperative coordinator flows into SwiftUI by introducing custom glue layers (NavigationStackWrapper and CoordinatedViewAdapter).

It worked as a proof of concept, but the architecture became fragile: tight coupling between wrapper components, PassthroughSubject-driven routing, and timing-sensitive updates that sometimes required async delay workarounds. In practice, it added significant maintenance overhead to reproduce behavior that UINavigationController gives natively.

Solution2 - UIKit-Like API Built on SwiftUI

This prototype keeps the coordinator style but exposes an API that mirrors UIKit semantics (push/pop, present/dismiss, reference-based controllers).

The result was predictable and easier to reason about than Solution1, but it also made one thing clear: we effectively rebuilt UIKit concepts on top of SwiftUI. At that point, the SwiftUI navigation layer provided little practical benefit over using UIKit navigation directly.

Conclusion

Both experiments reinforced the same outcome from the article: SwiftUI is excellent for building screens, while UIKit remains the more reliable choice for complex app navigation.

About

This repository accompanies the article "UIKit Is Not Dead: Why We Still Use It for Navigation" and contains two internal SwiftUI navigation experiments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages