views:

201

answers:

1

Hi,

I am having a problem with creating a navigation controller after on the other side of the application :) ... I mean after clicking this small info button and flipping on the other side ...

I'm getting this error:Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "InfoController" nib but the view outlet was not set.'

And I know that the problem is somewhere in connecting the view outlet to the the view ...

Screenshot from my IB is here: IB screenshot

I will appreciate any help as this is the last piece of my app I need to finish ...

Cheers,

Ondrej

A: 

UIViewController has a ivar called view. If it is not connected in IB (or set in code), you'll get this message. In IB, click on "File's Owner", then click on the "Connections" tab in the Inspector. Under "Outlets" what is the "view" parameter connected to? It needs to be connected to the view you intend to control from your InfoController.

That being said, there is some inconsistency in what you are showing in your screenshot. Normally, you won't have a UINavigationController be part of your UIViewController xib. Instead, it should be in your MainWindow.xib. You can try to drag a connection from your File's Owner to the view inside of your navigation controller, but I don't think that will work. You'll have to move the navigation controller to your MainWindow.xib and then set it's view to be of type InfoController using xib InfoController.

If this is unclear, create a new project using the "Navigation-based Application" template in Xcode. Then open the MainWindow.xib file in IB. You'll see in there how the navigation controller should be set up.

You'll get more visibility on this question if you add 'iphone' as a tag, by the way.

Matt Long