Wednesday, April 2, 2014

Navigating View Controllers Backward

-(void) pushLogOutViewController
{
    
    NSArray *viewControllers = [[self navigationController] viewControllers];
    for( int i=0;i<[viewControllers count];i++){
        id obj=[viewControllers objectAtIndex:i];
        if([obj isKindOfClass:[LoginViewController class]]){
            [[self navigationController] popToViewController:obj animated:YES];
            return;
        }
    }
    
    

}

No comments:

Post a Comment