【发布时间】:2014-08-27 13:04:45
【问题描述】:
当我的应用中有这行代码时,iPad(设备和模拟器)不会自动旋转:
popOver = [[UIPopoverController alloc] initWithContentViewController:viewController];
当我注释掉该行时,它会自动旋转。
另外,我是这样介绍的:
[popOver presentPopoverFromBarButtonItem:addButton permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
我错过了什么吗?
【问题讨论】:
-
你的应用支持横向和纵向吗?
-
@JasperPol 是的。所有方向均已启用。也覆盖了 shouldAutorotate 方法。
-
@JasperPol 这个问题似乎是旋转后弹出框的定位不正确。对我来说,旋转/方向变化根本没有记录。我也尝试了这些建议,但仍然不成功。
标签: ios objective-c ipad cocoa-touch