ios - xcode 7 中的菜单栏错误

标签 ios swift2 xcode7

有谁知道如何解决这个错误?

- (NSUInteger)supportedInterfaceOrientations

“supportedinterfaceOrientationMask”(又名“enum UIInterfaceOrientationMask”)与“NSUInteger”(又名“unsigned long”)实现中的返回类型冲突

最佳答案

iOS 9 中的文档发生了变化,如果您转到 UIViewController.h,它现在将 supportedInterfaceOrientations 声明为:

- (UIInterfaceOrientationMask)supportedInterfaceOrientations NS_AVAILABLE_IOS(6_0);

如果您更改返回类型,Xcode 将停止报错。

关于ios - xcode 7 中的菜单栏错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32663037/

相关文章:

objective-c - ScrollView 内容大小不起作用

ios - 逐渐改变状态栏颜色

swift - 在 Swift 中定义 [tab] 键按下的顺序

swift - Root View Controller 和展开 segues?

ios - 如果快速填充文本字段,则启用按钮

ios - 在iOS键盘上覆盖自定义键盘

ios - 使用 PJSIP 的 Ping 机制

ios - tableView RSS 提要 Swift 2.0

xcode - 使用未解析的标识符 GGLContext 和 GAI

ios - 在 Xcode 中更改 UIlabel 文本大小?