iOS navigation history
I have a mapViewController
, tagsViewController
and detailViewController
. In my mapViewController viewWillAppear:(BOOL)animated
method I want to know if tagsViewController
or detailViewController
was just rem开发者_Python百科oved so I can do some custom stuff.
So is there a way to know what view was just removed?
Notifications look like a better approach here. Rather than you having to track the navigation controller. Let those two controllers tell you if they are going off. Although this would mean that you won't have that information in viewWillAppear:
but you will have that information as soon as the views are unloaded.
精彩评论