Note that there are some explanatory texts on larger screens.

plurals
  1. POUITableView segue not working
    primarykey
    data
    text
    <p>I followed the SimpleDrillDown app example in the docs for a workout app that shows workout names in the first UITableView and exercises in the second UITableView.</p> <p><strong>My app is in Dropbox here: <a href="http://db.tt/V0EhVcAG" rel="nofollow noreferrer">http://db.tt/V0EhVcAG</a></strong></p> <p>I used storyboards, have prototype cells, but when I load in simulator the first UITableView won't let me click and go to the detail UITableView. The disclosure indicator chevrons don't load. The app builds successfully and there are no formal errors.</p> <p>My tableviews are in a navigation controller, my segue and prototype cells are all named accordingly in storyboard. </p> <h3>SpitfireViewController.m</h3> <pre><code>- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [dataController countOfList]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"WorkoutCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } Workout *workoutAtIndex = [dataController objectInListAtIndex:indexPath.row]; cell.textLabel.text = workoutAtIndex.title; return cell; } - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"showExercises"]) { NSIndexPath *selectedRowIndex = [self.tableView indexPathForSelectedRow]; DetailViewController *detailViewController = [segue destinationViewController]; detailViewController.workout = [dataController objectInListAtIndex:selectedRowIndex.row]; } } </code></pre> <h3>DetailViewController.m</h3> <pre><code>- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [workout.exercises count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"ExerciseCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } cell.textLabel.text = [workout.exercises objectAtIndex:indexPath.row]; return cell; } </code></pre> <h3>AppDelegate.h</h3> <pre><code>#import &lt;UIKit/UIKit.h&gt; @class DataController; @class SpitfireViewController; @interface SpitfireAppDelegate : UIResponder &lt;UIApplicationDelegate&gt; { UIWindow *window; SpitfireViewController *spitfireViewController; DataController *dataController; } @property (strong, nonatomic) UIWindow *window; @end </code></pre> <h3>AppDelegate.m</h3> <pre><code>#import "SpitfireAppDelegate.h" #import "SpitfireViewController.h" #import "DataController.h" @implementation SpitfireAppDelegate @synthesize window; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { spitfireViewController = [[SpitfireViewController alloc] init]; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:spitfireViewController]; DataController *controller = [[DataController alloc] init]; spitfireViewController.dataController = controller; [window addSubview:[navController view]]; [self.window makeKeyAndVisible]; return YES; } @end </code></pre> <p><img src="https://i.stack.imgur.com/WGAJE.png" alt="My Storyboard"> <img src="https://i.stack.imgur.com/RjpAI.png" alt="SpitfireViewController (Root)"> <img src="https://i.stack.imgur.com/RihWa.png" alt="DetailViewController"></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.
 

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