0

i'm trying to update an application for iOS 6. So i run it with the 6.0 Simulator to see if i get any errors or warnings, but there aren't any. But in fact i was expecting to get a warning for shouldAutorotateToInterfaceOrientation: because it's deprecated in iOS 6. Why don't i get a warning? Do i need to do something else than running it with a 6.0 simulator?

Thanks guys!

4

3 回答 3

0

deprecated warning comes when you call deprecated function byself. as shouldAutorotateToInterfaceOrientation: is in view hierarchy in iOS5 but not in iOS6 so when you build app for iOS6 this function behave like normal view controller function and not consider in view life cycle. That's why warning not shown by xCode.

于 2012-11-28T13:01:48.060 回答
0

The warning won't come in the Simulator, it will come in Xcode. Try setting your "Deployment Target" to 6.0 in Xcode and the warning should appear.

于 2012-11-28T13:20:55.753 回答
0

If your app is deployed only for iOS6, you will see that warning, otherwise, you should implement both methods (shouldAutorotateToInterfaceOrientation for pre-iOS6 & shouldAutorotate for iOS6)

于 2012-11-28T13:25:08.773 回答