I'm hitting my head against the wall with a navBar issue. See this sample project for a better idea of what I'm trying to achieve. Basically, my app structure is like this:
NavController -root-> ViewControllerA -> button -> push -> ViewControllerB --> ViewControllerC
| |
button -> presentModally |
| |
V |
PopoverViewController |
| |
button -> push to the nav controller |
| |
| |
---------------------------------------
A button on the second view controller (call it B) of the nav stack will present a modal view controller with a clear background (its modal presentation style is overCurrentContext
to look like a popover):
Then, a button on the popover will push a new view controller on to the nav stack (call it C):
[
The popover is presented by B as opposed to the actual nav controller (B defines the presentation context). This so that when the popover pushes C on the stack, C doesn't just cover B, but covers the popover as well.
The problem arises when dismissing C. The nav stack pops back to B with the popover still on top (which is my intention). However, B now fills the entire frame of the nav view controller (before C was pushed, B's top was pinned to the navBar). This causes views near the top of B to be clipped by the navBar:
A look at the UI Inspector confirms that this is because B's view now fills the nav controller's view:
This was not the case before C was presented. Any ideas as to what's causing this to happen?