Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
377 views
in Technique[技术] by (71.8m points)

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

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...