Gagan Joshi Gagan Joshi - 1 year ago 350
iOS Question

Warning :-Presenting view controllers on detached view controllers is discouraged

In my app, I am using a navigation controller. Later on in some view I am using

for showing a zoomed image.
Also I am not using a Storyboard or nib.

I am getting this error in iOS 7 only. It works fine in iOS 6 and earlier:

Presenting view controllers on detached view controllers is

Answer Source

The reason of this warning is i was presenting a view controller over a small view that is not full size view. Given below is the image of my project. where on click on four option above. User navigate to different childviewcontroller's view.(it works like tabViewcontroller). But the childviewcontroller contains view of small size. So if we present a view from childviewcontroller it gives this warning.

master detail view

And to avoid this, you can present a view on childviewcontroller's parent

  [self.parentViewController presentViewController:viewController animated:YES completion:nil];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download