objective c - What method is called after tap back button in ios -
i have 2 view controllers navigation controller. when use [self.navigationcontroller popviewcontrolleranimated:yes];
in second 1 - first 1 opens methods in viewdidload don't called. methods called in first 1 controller in situation?
the navigation controller sends viewwillappear:
view controller before putting view on screen, , viewdidappear:
after.
inside viewwillappear:
, viewdidappear:
, view controller can check self.ismovingtoparentviewcontroller
. if ismovingtoparentviewcontroller
yes
, view controller being added navigation controller in first place (presumably because it's navigation controller's root view controller, or because being pushed). if ismovingtoparentviewcontroller
no
, view controller in navigation controller's stack, , view controller being popped reveal it.
read “responding display-related notifications” in view controller programming guide ios.
Comments
Post a Comment