ContainerController
ContainerController copied to clipboard
Preliminary SwiftUI support
For now it will simply add a UIHostingController
view
to the contentView
.
I commented out calls needed for proper view controller containment because it doesn’t play well with my UINavigationController
.
Added code that properly adds/removes the child view controller calling the corresponding methods on both parent and child controllers.
It is cleaner now but it can pose problems with the parent. For instance when using ContaninerController
with a UINavigationController
it will corrupt push/pop navigation.
Moreover, it would be cleaner to make ContaninerController
a proper container UIViewController
(currently an NSObject
) that is the parent of both the target controller much like a UITabBarController
, and the presented controller (currently a view).
I've noticed that taps in the embed SwiftUI view are not recognized.