小编the*_*mer的帖子

方法不会覆盖它的超类中的任何方法

当我收到此错误时,我正在尝试创建一个新的覆盖功能:方法不会覆盖它的超类中的任何方法

我已经尝试删除覆盖部分,但这只会给我一个错误.

override func touchesBegan(touches: NSSet!, withEvent event: UIEvent!) {

    let touch : UITouch! = touches.anyObject() as! UITouch

    location = touch.locationInView(self.view)

    person.center = location
}

override func touchesMoved(touches: NSSet!, withEvent event: UIEvent!) {

    let touch : UITouch! = touches.anyObject() as! UITouch

    location = touch.locationInView(self.view)

    person.center = location

}
Run Code Online (Sandbox Code Playgroud)

touchesmoved touchesbegan swift

1
推荐指数
1
解决办法
3328
查看次数

标签 统计

swift ×1

touchesbegan ×1

touchesmoved ×1