1

I have a view and have navigationController...

and a rightBarButtonItem on it ,

then click-->use popoverController show the tableViewController's view... tableView have 3 cells----like A,B,C

and i want to know , in the table list, different textlabel go to different view, cell A goto View_A,cell B goto View_B.... I need to put the view in the navigationController...

But it doesn't work in the tableViewController's class,when i write the code in the didSelectRowAtIndexPath function.....

I try

[ self.navigationController pushViewController:detailViewController animated:YES];

or

[ self.parentViewController.navigationController pushViewController:detailViewController animated:YES];

or

[ self.view.superview.navigationController pushViewController:detailViewController animated:YES];

I dont know how to do something outside when I click the tableView's cell,especially how to get the navigationController.....

1 Answer 1

0

As you are in the popview and that view is just dismissed after taping on the cell of the tableView the self is referred to the popupView it doesn't work. You must have to use delegate to do the work done. Please refer to thisLink for reference

3
  • if i use self.popoverController.delegate = self; does it help?
    – GanLiting
    Jun 20, 2012 at 8:55
  • yes, as per my knowledge it will help you to call popoverController's delegate methos
    – The iOSDev
    Jun 20, 2012 at 8:57
  • oh i see, i just add UINavigationController value to the tableViewController.. It can help....
    – GanLiting
    Jun 20, 2012 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.