【发布时间】:2012-01-05 16:51:49
【问题描述】:
我正在 iPad 上绘制仅支持横向的视图,但有时在 iOS 模拟器中,视图被颠倒绘制并且 iPad 状态栏处于纵向模式。当我在模拟器中旋转设备时,一切正常,只是初始负载很奇怪。我正在使用 CGRect 设置视图并使用标准的 iOS 坐标系。
我的自转方法:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) | (interfaceOrientation == UIInterfaceOrientationLandscapeRight));
}
【问题讨论】:
标签: ios cocoa-touch uiview uiviewcontroller autorotate