SwiftPages icon indicating copy to clipboard operation
SwiftPages copied to clipboard

Presenting view controllers on detached view controllers is discouraged

Open KaushikShivam opened this issue 9 years ago • 2 comments

Thanks for the great library.

I have a Menu with 3 child viewControllers. One of them has tableView and when a cell is tapped, presentViewController method is called in didSelectItemAtIndexPath. Then, the following warning displays in debug window.

Presenting view controllers on detached view controllers is discouraged The modal viewcontroller is displayed properly but when dismissViewControllerAnimated is called, source view layout collapses and the view goes under navigationbar. How can I prevent from the warning? I tried the following code but when dismissViewControllerAnimated is called, EXC_BAD_ACCESS error occurs.

self.view.window!.rootViewController?.presentViewController(vc, animated: true, completion: nil) Swift 2.0 XCode 7

KaushikShivam avatar Nov 26 '15 11:11 KaushikShivam

Hi, Please check with the latest code I pushed :)

GabrielAlva avatar Feb 14 '16 08:02 GabrielAlva

Was there ever any resolution to this?

alaxicsmith avatar Sep 18 '17 21:09 alaxicsmith