Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone Xcode - Navigation Controller on second xib view?
    primarykey
    data
    text
    <p>Everything is fine, my navigation controller display's my 'Menu 1' item, but when i click it there appears to be a problem with the:</p> <p>[self.navigationController pushViewController:c animated:YES]; line it doesn't connect to the break point in the myClass file. so I think i've not joined something? but unsure what?</p> <p>My second view with the navigation controller doesn't have direct access to the AppDelegate so can't join it like I see in some tutorials.</p> <p>1st view is just a button when clicked calls:</p> <pre><code>[self presentModalViewController:mainViewController animated:YES]; </code></pre> <p>my second View 'MainViewController' header looks like:</p> <pre><code>@interface MainViewController :UITableViewController &lt;UITableViewDelegate, UITableViewDataSource&gt; { NSArray *controllers; UINavigationController *navController; } @property (nonatomic, retain) IBOutlet UINavigationController *navControllers; @property (nonatomic, retain) NSArray *controller; </code></pre> <p>Then I have my MainViewController.m</p> <pre><code>@synthesize controllers; @synthesize navController; - (void) viewDidLoad { NSMutableArray *array = [[NSMutaleArray alloc] init]; myClass *c = [[myClass alloc] initWithStyle:UITableViewStylePlain]; c.Title = @"Menu 1"; [array addObject:c]; self.Controllers = array; [array release]; } </code></pre> <p>implemented numberOfRowsInSection and cellForRowAtIndexPath</p> <pre><code>- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger row = [indexPath row]; myClass *c = [self.controllers objectAtIndex:row]; [self.navigationController pushViewController:c animated:YES]; // doesn't load myClass c // [self.navController pushViewController:c animated:YES]; } </code></pre> <p>Also in Interface Builder I dragged a Navigation Controller onto my new XIB and changed the Root View Controller class to MainViewController and also connected the File Owner connector to the Navigation Controller to connect the navController Outlet.</p> <p>Thanks for you time.</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.
 

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