开发者

Collapse when calling dismissModalViewController in tableView:didSelectRowAtIndexPath

I use this in a function of table's parent view to show the tableview:

-(IBAction)someFunc{
   UITableViewController* 开发者_如何学Pythoncontroller = [[UITableViewController alloc] init];
   [self presentModalViewController:controller];
   [controller release]
} 

and after calling dismissModalViewController in the UITableView's tableView:didSelectRowAtIndexPath method, the parent view will show a second and then the program collapses.


Run under the debugger, look in the console. Likely something was not retained. Put a breakpoint on in table's parent view's viewWillAppear and viewDidAppear (probably in the latter). Likely referencing an object that was released.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜