I use ECSlidingViewController for a side-drawer effect in my application. When my initial view loads, there is a hidden view controller with an MKMapView behind the visible view. Needing to segue from map annotations, I had to embed my map view controller in a navigation controller. Now that the hidden view controller is a navigation controller and not a map view so my map initializes only after the navigation controller comes on screen. So my map's viewDidLoad
, which sets the region, is called before the map view's CLLocationManager delegate has time to respond with a location.
I need to have my nav controller and root view controller be instantiated synchronously. I would just manually segue, but I would guess the 'rootViewController' relationship segue has implementation details that I would be bypassing.
This was actually pretty simple, and has nothing to do with segues.
I was expecting a
rootViewController
property onUINavigationController
objects while overlooking the@property UIViewController* topViewController
.So in my top (visible) navigation controller's
viewWillAppear
: