【发布时间】:2015-11-01 19:40:19
【问题描述】:
当我得到这个错误时,我正在尝试创建一个新的覆盖函数:方法没有覆盖它的超类中的任何方法
我已经尝试删除覆盖部分,但这只会给我另一个错误。
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
}
【问题讨论】:
-
另一个错误是...?另外,这个方法所在的对象是什么类型的?
-
不同的错误信息,但与stackoverflow.com/questions/28771896/…中的问题相同。
标签: swift touchesbegan touchesmoved