ContainerController icon indicating copy to clipboard operation
ContainerController copied to clipboard

Preliminary SwiftUI support

Open rivera-ernesto opened this issue 4 years ago • 2 comments

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.

rivera-ernesto avatar Sep 16 '20 19:09 rivera-ernesto

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).

rivera-ernesto avatar Sep 21 '20 19:09 rivera-ernesto

I've noticed that taps in the embed SwiftUI view are not recognized.

rivera-ernesto avatar Sep 22 '20 13:09 rivera-ernesto