Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个有多个 ViewControllers 的程序。
在某些情况下,我只需要纵向模式,而在其他情况下,我只需要横向模式。
当我来自纵向视图控制器时,系统应自动将新视图控制器置于横向。
我怎样才能做到这一点?
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { return UIInterfaceOrientationLandscapeLeft; }
这可能会有所帮助
http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/RespondingtoDeviceOrientationChanges/RespondingtoDeviceOrientationChanges.html