Evolving Existing Projects With SwiftUI
summary
A production signing UI is rewritten almost entirely in SwiftUI while retaining an iOS 12 fallback, shipping as a real feature in the PDF viewer. Strategy uses UIHostingController wrappers around an optimized Objective‑C draw view, Combine publishers mapped from notifications, and UIKit hacks: anchor UIView for popovers, introspection to access underlying UITextView, and a keyboard coordinator. Known issues include geometry reader crashes on Catalyst and ObservableObject limits on NSObject; overall the approach works in production with monitored crash fixes.
AI-written summary · about
chapters (11)
- 0:00Introduction and background
- 3:59Why use SwiftUI in production
- 8:34Mixing SwiftUI with legacy code
- 12:05Popover presentation challenges
- 16:43Toolbar API limitations
- 18:31Handling attributed graph crashes
- 20:58ObservableObject workarounds
- 21:19First responder and keyboard issues
- 24:11Wrapping custom views
- 26:40Keyboard avoidance implementation
- 29:07Summary and lessons learned








