【发布时间】:2023-03-12 02:55:01
【问题描述】:
我已经完成了 iPhone 和 iPad 的纵向应用程序,现在我需要横向的应用程序,iPhone 和 iPad 都只使用 xib。一些 UI 是以编程方式创建的。刚才我是使用这个代码:
-(NSUInteger)supportedInterfaceOrientations
{
// return your mask here e.g.:
if(UIDeviceOrientationIsPortrait([[UIDevice currentDevice] orientation]))
return UIInterfaceOrientationMaskPortrait;
else
return UIInterfaceOrientationMaskLandscape;
}
但它不能正常工作,所以任何人都可以帮助我......?
【问题讨论】:
-
希望此链接对您有所帮助stackoverflow.com/questions/13100347/…
标签: iphone objective-c ios6 uiinterfaceorientation device-orientation