Friday, November 6, 2009

View Linkage Error in Tab Bar Controller

In an attempt to add new views to the tab bar view template app, I got the following error (truncated from its lengthier form:

[UIViewController _loadViewFromNibNamed:bundle:] loaded the "FirstTab" nib

In the MainWindow.xib tab view controller, I had already linked my "FirstTab" nib, but a second step was required:

  • Open FirstTab.xib.
  • Right click on the view (or do this through the inspector).
  • Drag the New Referencing Outlet to the File's Owner.
  • Select the 'view' option (which is likely the only one).
Run the build and it should work. You obviously need to do this for every tab that pulls the information from a nib, else the next one will cause a crash when the app launches.

No comments: