Override func error in Swift 2

前端 未结 2 1152
既然无缘
既然无缘 2020-12-05 02:20

This code in XCode 6 does not have error but in XCode 7 (Swift 2) this error has occurred :

Method does not override any method from its superclass

2条回答
  •  没有蜡笔的小新
    2020-12-05 02:23

    Just delete the override it will works.

    func touchesBegan(touches: Set, withEvent event: UIEvent) {
            /* Called when a touch begins */
    
    }
    

提交回复
热议问题