I know of a couple of ways to do this, none of them is exactly what you want but they might work.
First, you can detect the back on UIViewController1
's viewWillDisappear
, like this:
if ([self.navigationController.viewControllers indexOfObject:self] == NSNotFound) {
//Do what you want to do here
}
Second, you could make Home UIViewController1
's delegate and call whatever method you want.
Third, you could set a variable when Home pushes UIViewController1
onto the stack and check it on viewDidAppear
.