Monday, October 27, 2014

Determine type of LastViewController on NavigationController stack

id lastController = [self.navigationController.viewControllers objectAtIndex:self.navigationController.viewControllers.count -1];
      
if([lastController isKindOfClass:[LoginViewController class]]) {
    //LastController is of type LoginVC
    //Perform some activity here  

}

No comments:

Post a Comment