我发现很难解决此错误,请谁能帮助我
Xcode 7 Beta 2
设置UITouch?没有名为Generator的成员
override func touchesCancelled(touches: Set<UITouch>?, withEvent event: UIEvent?) {
for obj in touches {
if let touch = obj as? UITouch {
let view = self.touchToView[touch]
self.handleControl(view, controlEvent: .TouchCancel)
self.touchToView[touch] = nil
}
}
}
}
enter image description here
最佳答案
您需要打开可选包装-试试
for obj in touches! {
// code here
}
关于ios - 设置<UITouch>?没有名为Generator的成员,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/31250989/