Search code examples
iosipadios6uiviewcontrolleruisplitviewcontroller

presentViewController is disabling all removeFromSuperview messages in a UISplitViewController


Here is a visual representation of the UISplitViewController:

I'm trying to present a UIViewController (myVC) that's a subview of a UIView inside the DetailViewController of a UISplitViewController using this:

[appDelegate.splitViewController presentViewController:myVC animated:NO completion:nil];

It presents, I dismiss it, the app rotates without a hitch, then when I try to reload the detail view by clicking on a cell in the rootViewController (a UINavigationController), all the [orangeUIView removeFromSuperview] messages are mysteriously disabled (there are more orange UIViews hidden here that are inside a mainScrollView). The "INFO LABEL" in the topToolbar is updating, so I know the cell is sending data...

Why would this activity disable removeFromSuperview if presented using splitViewController? I've presented myVC using the detailViewController...

[appDelegate.detailViewController presentViewController:myVC animated:NO completion:nil];

which doesn't disable removeFromSuperview, but causes an assortment of other rotational crashes.

What's going on here?


Solution

  • Since this question was created as a result of a previous question, the answer to this problem was...try something else. I was unable to fix this problem by presenting a view controller, most likely because I'm using a custom UISplitViewController with a hierarchy I'd rather not get into.

    Here is the solution I came up with:

    Core Plot - Options on making the graph full screen - addSubview after presenting modal problems