self.navigationController.viewControllers
возвращает все контроллеры представления в стеке.делать как
@interface ViewController () {
// create the one global int for get the count of VC.
int myVar;
}
- (void)viewDidLoad {
[super viewDidLoad];
myVar = 0;
for (UIViewController *vc in self.navigationController.viewControllers) {
// check your VC is available or not in using isKindOfClass
if ([vc isKindOfClass:[ViewController class]]) {
myVar += 1;
}
}
if (myVar > 1){
// available
}
}