Tag: 方向改变

如何在iOS中禁用特定的方向

我想在某些视图中禁用横向。 我已经覆盖了以下两种方法,但是这些方法不会随时调用。 – (NSUInteger) supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } – (UIInterfaceOrientation) preferredInterfaceOrientationForPresentation { return UIInterfaceOrientationPortrait; } 我错过了什么吗? 请帮帮我。