Loading

Saturday, September 18, 2010

Push 2 View Controller from App Stack

YourAppDelegate* appDelegate = (YourAppDelegate*)[UIApplication sharedApplication].delegate;
UINavigationController *navigationController = [appDelegate navigationController];
NSInteger Go_To_Controller=[navigationController.viewControllers count]-3;
[navigationController popToViewController:[navigationController.viewControllers objectAtIndex:Go_To_Controller] animated:YES];

2 comments:

  1. Hi,

    Ashish nice to see this article but how can u push 2 view controller when you do not know that which is 1st controller and which is 2nd controller.

    I think that you will use pop controller on this article.

    ReplyDelete
  2. What is the Meaning of push 2 view controller ???
    push only one view controller and have some condition in its view will appear and push it again.

    ReplyDelete