swift-cross-ui
swift-cross-ui copied to clipboard
Improve interoperability with native UI frameworks
This PR introduces various APIs related to improving interoperability between SwiftCrossUI view code and native UI frameworks. This includes:
- Making it easier to make platform-specific modifications to the native widgets behind SwiftCrossUI views via the
inspectfamily of modifiers- This allows people to work around missing SwiftCrossUI features and to access niche platform-specific APIs that we don't plan on wrapping
- Enabling the hosting of SwiftCrossUI views in native apps via the
FooHostingViewfamily of types - Enabling the hosting of native views in SwiftCrossUI apps via the
FooRepresentablefamily of types- (SwiftCrossUI already
NSViewRepresentable,UIViewRepresentableandUIViewControllerRepresentable, but we still need to introduce similar APIs for the non-Apple backends)
- (SwiftCrossUI already
So far I've completed the inspect family of view modifiers (which are housed in each backend), and introduced an AdvancedCustomizationExample app to showcase these new advanced customization APIs.