0

I have an iPad app (XCode 4.6, iOS 6.2, Storyboards, ARC), with 4 scenes and a navigation controller, all connected using segues. On the first scene, if the user taps on it, it will display a UIPopover which contains a UITableView. The popover and tableview are NOT connected to anything via segues. This is an image of the layout:

image showing storyboard scenes

The Navigation Controller, UITableView and UIView are the three controllers framed in the red box. The problem is that when I tap on a row in the first UITableView, it does not transfer to the UIView. I am using only a push segue for the transfer to the next scene.

UPDATE Embedded the UITableViewController in a NavigationController and made the necessary connections: tableViewCell to UIView, (push mode). Now I'm getting this run-time error (if I change the mode to modal it works but fills the entire window... if I change the mode to popover, it works but now I have two popovers, which looks like a 3 year old wrote it! :-{

*** Terminating app due to uncaught exception 'NSGenericException', reason: 'Push segues can only be used when the source controller is managed by an instance of UINavigationController.'

The large scene in the red box is the navigation controller... so why is it not finding it?

SpokaneDude
  • 4,856
  • 13
  • 64
  • 120

1 Answers1

0

Yes the popover needs its own navigationController. Did you check, if self.navigationController contains smth.? Probably it is nil, if nothing happens.

calimarkus
  • 9,955
  • 2
  • 28
  • 48
  • yep, navigationController is nil... OK, so how to I connect them so the UITableView and UIView recognize the navigation controller? – SpokaneDude May 16 '13 at 22:58
  • Try embedding your tableview with a navigation controller. That should help you out. – Adrian P May 16 '13 at 23:23
  • I did as you suggested, but NSLog still shows the navigation controller as nil... I then tried connecting the UITableView to the UIView using a segue (with the embedded nav controller), but that didn't work either. – SpokaneDude May 16 '13 at 23:36
  • I believe this is a bug, but I don't have time now to report it; I decided to not use seague's in this particular instance, but still had to have a navigation controller. Thanks everybody for your time. – SpokaneDude May 18 '13 at 22:10