Search code examples
iosuinavigationcontrollermaster-detail

Are there any methods to let me know when a navigation push is complete?


I have a tableview set up as a Master-Detail view for iPad and I am having a problem with the navigation getting corrupted. The link between the Master and Detail is a Push-Detail split, I need it this way as the user can then navigate within the detail and the master stays as what it is.

The problem is that if you tap through the Master side too quickly I get navigation corrupted messages such as

Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.

which is bad!

I have set up a way around this where a delay is used and a BOOL has to be yes for it to segue to the next one, which stops the problem but it adds a delay of around 1 second so it looks bad as at times it looks like it isn't working as the new view isn't loaded.

Are there any methods that get called when a navigation push is finished?

Thanks J


Solution

  • I would think UIViewController's viewDidAppear: method in your subclassed view controller will be enough to signify that your push is complete.