我想在教科书中实现这个功能,它不工作。这本书是在不同版本的迅速,所以这可能是为什么它不工作。我想知道如果有人知道如何解决这个问题?我正在使用swift。ios9的旋转支持问题?
override func supportedInterfaceOrientations() -> Int {
return Int(UIInterfaceOrientationMask.Portrait.rawValue) |
Int(UIInterfaceOrientationMask.Landscape.rawValue)
}
错误:方法没有从它的超类中'覆盖'任何方法。 当我删除覆盖,它给我这个错误:
方法“supportedInterfaceOrientations()”与目标C选择“supportedInterfaceOrientations”与从超类的UIViewController“方法“supportedInterfaceOrientations()”以相同的目标C选择
你有没有在这所采取偷看? http://iphonedev.tv/blog/2015/6/23/fix-uiviewcontroller-supportedinterfaceorientations-to-use-uiinterfaceorientationmask-and-optionsettype-in-swift-2 – Adrian