iphone - Problems with pushViewController -


i have application there root view controller pushes view controller view. view controller shows table. when cell selected, pushes view controller. first push works, second doesn't. here code selection of cell in table:

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath {   twoviewcontroller *two = [[twoviewcontroller alloc] initwithnibname:@"twoviewcontroller": bundle:[nsbundle mainbundle]]; [self.navigationcontroller pushviewcontroller:two animated:yes]; [two release]; 

any idea i've done wrong? codes i've used both pushes identical... i've tried putting code in touchupinside event uibutton well, not work. guess there no navigationcontroller push view, don't know. please help!

did change -initwithnibname:bundle method on twoviewcontroller? guess doesn't initialize correctly (i.e.: method doesn't initialize super class correctly).

edit: think found error, it's kind of obvious, actually.

please check code posted:

initwithnibname:@"twoviewcontroller": bundle:[nsbundle mainbundle]]; 

the error near @"twoviewcontroller": string, semicolon should not there, change to:

initwithnibname:@"twoviewcontroller" bundle:[nsbundle mainbundle]]; 

Comments