Pushing View from UITableView Problem

Posted by golfromeo on Stack Overflow See other posts from Stack Overflow or by golfromeo
Published on 2010-06-12T18:36:50Z Indexed on 2010/06/12 18:42 UTC
Read the original article Hit count: 223

Filed under:
|
|

Basically, what I want is to be able to press a record in a table, and have it push to another view.

To do this, I created a nib file and a UIViewController subclass (for the "pushed" view). I set the nib file's "File Owner" to be the controller I created. Then, in the view controller of the table that will push that view, I set the didSelectRowIndexAtPath: method to include the following:

SearchTableController *vc = [[SearchTableController alloc] initWithNibName:@"SearchTable" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:vc animated:YES];
[vc release];

(where "SearchTableController" is the name of the UIViewController subclass and "SearchTable" is the name of the nib file)

However, when I run this code and click on the record, nothing happens- the app doesn't crash, but the view doesn't get pushed. The code is getting run, because it works when I NSLog(), but it doesn't seem to be pushing the view.

Thanks for any help in advance.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk