Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone: Creating a hierarchy-based table navigation
    primarykey
    data
    text
    <p>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:</p> <p><a href="http://i42.tinypic.com/30bmp2w.png" rel="nofollow noreferrer">Click here to view what I have.</a></p> <p>I would further like to, say when CSS is tapped, it goes to a new view which has another <strong>table</strong> in it. This table would then take the user to a detail view, which is scrollable and you can switch pages through it.</p> <p>I would appreciate longer, more structured tutorials on how to do each and every bit to get it to <em>work</em>.</p> <p>Here's my array in my implementation file:</p> <pre><code>- (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]; } </code></pre> <p>and my .h:</p> <pre><code>@interface RootViewController : UITableViewController &lt;UITableViewDelegate, UITableViewDataSource&gt; { IBOutlet UITableView *tblSimpleTable; NSArray *arryClientSide; NSArray *arryServerSide; } </code></pre> <p>My current code crashes the script, and this error is returned in the console:</p> <pre><code>Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "NextView" nib but didn't get a UITableView.' </code></pre> <p>If that error is the source of why it's not pushing, then an explanation of how to remedy that would also be appreciated</p> <p><strong>NextViewController implementation</strong></p> <pre><code>// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { arryBasicCSS = [[NSArray alloc] initWithObjects:@"Implement", @"Syntax", @"Classes and IDs", @"Fonts", @"Backgrounds", @"Lists", @"Links", nil]; arryIntermediateCSS = [[NSArray alloc] initWithObjects:@"Padding and Margin", @"Alignment and Floating", @"Pseudo-class and Element", @"Opacity and Display", nil]; arryAdvancedCSS = [[NSArray alloc] initWithObjects:@"Sprites", @"Attribute Selectors", @"Animation", nil]; self.title = @"CSS"; [super viewDidLoad]; } - (IBAction) changeItemTable:(NSString *)str{ tblCSS = str; } </code></pre> <p><strong>NextViewController.h</strong></p> <pre><code>@interface NextViewController : UITableViewController { IBOutlet UITableView *tblCSS; NSArray *arryBasicCSS; NSArray *arryIntermediateCSS; NSArray *arryAdvancedCSS; } </code></pre> <p>Many thanks, Jack</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