Bridges SwiftUI and UIKit frameworks by wrapping views and controllers to enable seamless integration and incremental migration in iOS apps.
This skill provides specialized guidance for integrating legacy UIKit components into modern SwiftUI views and embedding SwiftUI content within existing UIKit architectures. It covers essential protocols like UIViewRepresentable and UIViewControllerRepresentable, alongside the UIHostingController for reverse integration. Developers can leverage this skill to master the Coordinator pattern for delegate handling, ensure thread-safe state synchronization across framework boundaries, and manage complex layout requirements using intrinsic sizing and modern iOS 16+ layout APIs.
주요 기능
01Synchronize reactive state between SwiftUI @Bindings and UIKit properties
02Implement the Coordinator pattern for UIKit delegates and data sources
03Embed SwiftUI views in UIKit via UIHostingController and UIHostingConfiguration
04409 GitHub stars
05Wrap UIKit views using UIViewRepresentable with lifecycle management
06Handle complex sizing and layout bridging including sizeThatFits and intrinsicContentSize
사용 사례
01Displaying SwiftUI views within existing UIKit-based collection view or table view cells
02Integrating UIKit-exclusive SDKs like camera previews, map views, or document scanners into SwiftUI
03Incrementally migrating a legacy UIKit application to a modern SwiftUI architecture