Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li><p>Create the class which needs to be displayed. Say you created the class named <code>LoginView</code>.</p></li> <li><p>When you create the navigation based application, the <code>AppDelegate</code> class contains the following code:</p> <pre><code>// Add the navigation controller's view to the window and display. [window addSubview:navigationController.view]; [window makeKeyAndVisible]; </code></pre></li> <li><p>Add the following lines just above the code mentioned in step 2:</p> <pre><code>LoginView *logView = [[LoginView alloc] initWithNibName:@"LoginView" bundle:nil]; [self.navigationController pushViewController:(UIViewController *)logView animated:YES]; </code></pre></li> <li><p>Add the following or similar function in the <code>AppDelegate</code> class. This will hide the <code>LoginView</code> view and displays the <code>rootView</code> controller class.</p> <pre><code>-(void) LoginSuccess { // Add the navigation controller's view to the window and display. [self.navigationController popViewControllerAnimated:YES]; RootViewController *rootView = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil]; [self.navigationController pushViewController:(UIViewController *)rootView animated:YES]; [window addSubview:navigationController.view]; [window makeKeyAndVisible]; } </code></pre></li> <li><p>Add a function in the <code>LoginView</code> class similar to the function mentioned below. Call the function mentioned in step 4 as shown:</p> <pre><code>-(IBAction) OpenNavigation { TestNavgAppDelegate *pApp = [[UIApplication sharedApplication] delegate]; [pApp LoginSuccess]; } </code></pre></li> <li><p>Add the following code in the <code>RootView</code> controllers <code>viewDidLoad</code> method to hide the back button if you want:</p> <pre><code>[super viewDidLoad]; self.navigationItem.backBarButtonItem = NULL; self.navigationItem.hidesBackButton = YES; </code></pre></li> </ol> <p>All the best.</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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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