iPhone: Creating a hierarchy-based table navigation.

Posted by Jack Griffiths on Stack Overflow See other posts from Stack Overflow or by Jack Griffiths
Published on 2010-04-24T12:06:09Z Indexed on 2010/04/24 12:13 UTC
Read the original article Hit count: 345

Filed under:
|
|
|

Hi there,

I've tried to ask this before, but nothing got answered. Basically, I would like someone to explain to me how to create a table, which when a cell is tapped, pushes the user to the next view for that cell. I have this so far:

Click here to view what I have.

I would further like to, say when CSS is tapped, it goes to a new view which has another table in it. This table would then take the user to a detail view, which is scrollable and you can switch pages through it.

I would appreciate longer, more structured tutorials on how to do each and every bit to get it to work.

Here's my array in my implementation file:

- (void)viewDidLoad {
    arryClientSide = [[NSArray alloc] initWithObjects:@"CSS", @"HTML", @"JavaScript", @"XML", nil];
    arryServerSide = [[NSArray alloc] initWithObjects:@"Apache", @"PHP", @"SQL", nil];
    self.title = @"Select a Language";
    [super viewDidLoad];
}

and my .h:

@interface RootViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> {
    IBOutlet UITableView *tblSimpleTable;
    NSArray *arryClientSide;
    NSArray *arryServerSide;
}

My current code crashes the script, and this error is returned in the console:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "NextView" nib but didn't get a UITableView.'

If that error is the source of why it's not pushing, then an explanation of how to remedy that would also be appreciated

Many thanks, Jack

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c