Note that there are some explanatory texts on larger screens.

plurals
  1. POSimple Table Navigation Help
    primarykey
    data
    text
    <p>Hi<br> My view is a table view inside a navigation controller. I used someone else's code to do this, and i know this was the person's intention when writing the code, but when I touch a table cell it brings me to the same view. How would you critique the code below to load a different nib with each different table cell.</p> <p>MoreTableViewController.h</p> <pre><code>@interface MoreTableViewController : UITableViewController &lt;UITableViewDelegate, UITableViewDataSource&gt; { IBOutlet UITableView *moreTableView; NSMutableArray *moreArray; AboutDetailViewController *aboutDetailViewController; } @property (nonatomic, retain) NSMutableArray *moreArray; @property (nonatomic, retain) AboutDetailViewController *aboutDetailViewController; @end </code></pre> <p>MoreTableViewController.m</p> <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row = [indexPath row]; if (self.aboutDetailViewController == nil) { AboutDetailViewController *aboutD = [[AboutDetailViewController alloc] initWithNibName:@"AboutDetailViewController" bundle:nil]; self.aboutDetailViewController = aboutD; [aboutD release]; } aboutDetailViewController.title = [NSString stringWithFormat:@"%@", [moreArray objectAtIndex:row]]; ROSS_APP_7AppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [delegate.moreNavController pushViewController:aboutDetailViewController animated:YES]; </code></pre> <p>}</p> <p>Would i have to do an if statement? If so, how would I write the code. I need all the help I can get here. Thanks For your help.</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.
 

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