Jumhyn
Jumhyn

Reputation: 6777

UITableViewCell segue created in Interface Builder will not fire

Currently, I have a basic UI set up in Interface Builder that features a UITableViewController, with a seque leading from the prototype cell to a detail view. My code dequeues the cell with the identifier I have set in Interface Builder, but when testing the app, a tap on the cell does nothing but turn it blue.

I want the segue to push the detail view on to my navigation controller's stack, but the segue simply won't happen. Why could this be?

Upvotes: 1

Views: 1283

Answers (1)

Dunes Buggy
Dunes Buggy

Reputation: 1819

Assuming you are working on storyboards (segues, etc.) there is a bug in the auto layout scheme of iOS. Hence the segue is not fired. However, you can simply give the segue and identifier in attributes inspector of the segue, and programmatically from your class you can use

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

in this method you can fire the segue in the following manner.

[self performSegueWithIdentifier:(NSString*) target:(id)];

Let me know if this helps you.

(Make sure your delegates and datasources are all set up correctly).

Upvotes: 3

Related Questions