ios - Pop to root view in an unwind segue -
my view controller sequence follows:
a -> (push) -> b -> (modal) -> c
i return c b using unwind segue , works.
i return directly c a.
in unwind segue located in b, try pop root view:
-(ibaction)unwindtobfromc:(uistoryboardsegue *)segue { [self.navigationcontroller poptorootviewcontrolleranimated:yes]; } and error:
tried pop view controller doesn't exist. when execute:
[self.navigationcontroller poptorootviewcontrolleranimated:yes]; in b in button action return no problem. what's wrong?
since c in modal, there nothing pop to. dismiss instead.
[self dismissviewcontrolleranimated:yes completion:nil];
Comments
Post a Comment