Xcode 4.2 Warnings when dropping Nav Controller on Tab Bar in IB

user975284 picture user975284 · Oct 2, 2011 · Viewed 11.7k times · Source

I'm developing an app which is iOS 4 compatible, so my deployment target is set to iOS 4.0.

Whenever I drop a UINavigationController onto a UITabBar, I get these two warnings:

  1. warning: Attribute Unavailable: Defines Presentation Context is not available prior to Xcode 4.2.
  2. warning: Attribute Unavailable: Defines Presentation Context on iOS versions prior to 5.0.

The UINavigationController functions as expected, in fact, the entire app runs perfectly. But these two warnings are driving me nuts!

Also, the moment I delete the UINavigationController the warnings disappear.

Answer

jkira picture jkira · Oct 16, 2011

Just uncheck the "Defines Context" checkbox in the attributes inspector. (Double-click on MainWindow.xib, select the navigation controller, then go to View->Utilities->Attributes Inspector.) That'll get rid of the warnings.