How to popViewController from button click of custom UITableViewCell

Posted by Chi Rod on Stack Overflow See other posts from Stack Overflow or by Chi Rod
Published on 2010-04-24T20:34:24Z Indexed on 2010/04/24 20:43 UTC
Read the original article Hit count: 739

I have a button in a custom UITableViewCell. Its UITableView is controlled by a UIViewController. I would like to return to the RootView when that button is clicked.

I am trying to use [self.superview.navigationController popViewControllerAnimated:YES]; in the target Action of the button, which is in the UITableViewCell.m file. However, it doesn't recognize "navigationController" because it is not in the stack.

How can I return to the RootView when that button is clicked?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about xcode