Xcode 4 Supported Device Orientations

I recently upgraded to Xcode 4. Earlier in Xcode 3, to set the allowed device orientations, you had to edit the shouldAutorotateToInterfaceOrientation: method in application deletion. But now in Xcode 4 I see that in Targets → Summary there is an option in which you can choose different orientations.

Which alternative will rule over another?

Greetings

Peter

+6
source share
2 answers

Your memory is a little defective; shouldAutorotateToInterfaceOrientation: found in custom subclasses of UIViewController. Therefore, it allows each view controller to say which orientations it works individually. Thus, you can have an application that overwhelmingly works in portrait or landscape design, but has a view controller that works only in portrait, for example, which is useful if you use ready-made code.

Supported device orientations in targets -> a summary goes to your Info.plist to provide OS metadata without having to run the application.

Ideally, the two should agree, and I do not think that one of them redefines the other. The summary information should summarize all of your various view controllers, but I would be surprised if you got something other than the weird weird start-up behavior if you filled it in incorrectly.

+9
source

The “target resume” is just a short hand for the data in the Info.plist file, and therefore it was available before. Nothing new here.

+1
source

Source: https://habr.com/ru/post/888314/


All Articles