【发布时间】:2013-03-23 01:04:11
【问题描述】:
当我的应用在 iPhone 上启动时,它会按原样纵向显示。当它以 iPhone 模式在 iPad 上启动时,如果以这种方式旋转,它将以横向显示。这是我的代码:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
-(BOOL)shouldAutorotate {
return NO;
}
【问题讨论】:
-
在摘要部分的项目设置中将支持的方向设置为仅纵向
标签: iphone ios objective-c ipad screen-orientation