views:

60

answers:

1

OK, here is how to re-create the problem had:

  1. Create a new project, using the Tab Bar Application
  2. Add a UILabel within SecondView.xib
  3. Add IBOutlet UILabel* myLabel; to FirstViewController.h
  4. Connect up myLabel in IB.
  5. Build and run.

When I click the second tab the app crashes with:

__TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION__
A: 

In IB, when using UITabBarController which has multiple UIViewControllers which all separately have their own NIB file assigned, there are two places where you need to set your UIViewController class file.

First, the obvious one was within the NIB file for each UIViewController.

Secondly, where I'd missed it, is withing the NIB file for your UITabBarController. In each UIViewController, not only do you set your NIB file, but also the Class.

Rew