Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to navigate back from UISplitViewController IOS 5?
    primarykey
    data
    text
    <p>I have 6 views in which I am placing the UISplitViewController at 4th position (i.e.the 4th view). Now when I navigate from 3rd view to 4th view (i.e. ViewController to SplitView) I want to come back to 4th view to 3rd view (i.e. SplitView to ViewController).</p> <p>I am using the below code to show the UISplitViewController when I am navigating from 3rd view to 4th view.</p> <pre><code>MasterViewController *masterViewController = [[MasterViewController alloc] initWithNibName:@"MasterViewController" bundle:nil]; UINavigationController *masterNavigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController]; DetailViewController *detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil]; UINavigationController *detailNavigationController = [[UINavigationController alloc] initWithRootViewController:detailViewController]; masterViewController.detailViewController = detailViewController; self.splitViewController = [[UISplitViewController alloc] init]; self.splitViewController.delegate = detailViewController; self.splitViewController.viewControllers = [NSArray arrayWithObjects:masterNavigationController, detailNavigationController, nil]; AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication]delegate]; appDelegate.window.rootViewController = self.splitViewController; </code></pre> <p>Now I have created a toolbar in my navigation bar programmatically and placed a back button. Below is the code what I have tried to pop the view back to viewcontroller. (i.e. from SplitView to ViewController).</p> <pre><code>-(IBAction)backbtn:(UIBarButtonItem *)sender { // RepresentativeAccount&lt;UISplitViewControllerDelegate&gt; *represent = [[RepresentativeAccount alloc]initWithNibName:@"RepresentativeAccount" bundle:nil]; // //[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] animated:YES]; // [[self.splitViewController.viewControllers objectAtIndex:0]popToViewController:represent animated:YES]; } </code></pre> <p>Please help thanks.</p>
    singulars
    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.
 

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