Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem with pushing multiple view controllers in one code block
    primarykey
    data
    text
    <p>In order to restore my iphone application to a paticular view controller, i am trying to push the view controllers one after another in the application delegate.</p> <p>The order of the view controllers on the stack initially is : <br /> 1. Root View Controller<br /> 2. First View Controller<br /> 3. Second View Controller<br /></p> <p>What I want is that when my application launches, it should go directly to the Second view controller. For this I have written the following code :</p> <pre><code>[self.navigationController popToRootViewControllerAnimated:NO]; RootViewController *rootViewController = [[RootViewController alloc]initWithNibName:@"RootViewController" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:rootViewController animated:NO]; FirstViewController *firstViewController=[[NSClassFromString(@"FirstViewController") alloc] initWithNibName:@"FirstViewController" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:firstViewController animated:NO]; SecondViewController *secondViewController=[[NSClassFromString(@"SecondViewController") alloc] initWithNibName:@"SecondViewController" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:secondViewController animated:NO]; </code></pre> <p>The problem is that when the Second view controller loads, its back button is named "Back" , instead of the title of the first view controller. I have not explicitly set a back button in the third view controller. </p> <p>Regards</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload