sammcewan / WYPopoverController

WYPopoverController is for the presentation of content in popover on iPhone / iPad devices. Very customizable.
Other
252 stars 74 forks source link

Presenting view controllers on detached view controllers is discouraged #74

Open PatrickNLT opened 8 years ago

PatrickNLT commented 8 years ago

It's important that we are able to present view controllers directly from the content view controller of the popover controller (see #25 for an example).

However, when we do, we get the following warning in the console: Presenting view controllers on detached view controllers is discouraged

It's only a harmless warning for now, but it could become worse in a future OS update, so it really should be fixed.

I believe the fix should be to be able to pass a parent view controller through the API, and set the content view controller as a child of its parent, using the addChildViewController method (see documentation).

hblockhus commented 8 years ago

I am having this same issue. Im trying to present an action sheet, and then present an imagepickercontroller when one of the options is selected. A larger issue is when the image picker is dismissed the wypopover gets resized to the entire screen.

barkiiqbal commented 8 years ago

@hblockhus did you found a fix for your issue. i am having save issue.

I am showing UIImagePickerController above WYPopoverController then the WYPopoverController covers the full screen and goes under the status bar

hblockhus commented 8 years ago

I just did a work around where i dismiss the WYPopoverController before showing the UIImagePicker, and then once I'm done with the image picker I show the WYPopover again. There is a brief moment once the image picker has vanished before the popover gets redisplayed, but it's better then before!