【发布时间】:2015-10-28 08:53:55
【问题描述】:
我有用于构建应用程序的应用程序压缩包,但它们的文件非常过时。我已经修复了应用程序中的大部分问题,但有一个问题我不明白。问题在于以下代码:
- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
{
// iPhone doesn't support upside down by default, while the iPad does.
// Override to allow all orientations always, and let the root view
// controller decide what's allowed
//(the supported orientations mask gets intersected).
NSUInteger supportedInterfaceOrientations =
(1 << UIInterfaceOrientationPortrait) |
(1 << UIInterfaceOrientationLandscapeLeft) |
(1 << UIInterfaceOrientationLandscapeRight) |
(1 << UIInterfaceOrientationPortraitUpsideDown);
return supportedInterfaceOrientations;
}
我在构建它时遇到的错误是:
/Users/username/Desktop/Appfolder/platforms/ios/Appname/Classes/AppDelegate.m:138:1:'application:supportedInterfaceOrientationsForWindow:'的实现中的返回类型冲突:'UIInterfaceOrientationMask'(又名'enum UIInterfaceOrientationMask' ) vs 'NSUInteger' (又名'unsigned long')
【问题讨论】:
标签: ios objective-c iphone xcode