【发布时间】:2012-08-26 10:16:33
【问题描述】:
对不起,我的问题很愚蠢,但我在任何地方都没有找到好的答案。
如果我检查 UIUserInterfaceIdiomPhone,iPhone 和 iPod touch 的结果都是 YES?
我的意思是:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
return YES;
}
仅对 iPad 返回 YES,对 iPhone 和 iPod 返回纵向?
我开发了一个 iPhone 应用程序,现在我将其更改为通用的。它几乎完成了,我不想改变我所有的“如果”。 (我自己没有真正的 iPod touch 来测试它)。
谢谢, 最大
【问题讨论】:
标签: iphone ios ipad ipod-touch