gpt4 book ai didi

ios - 设置 ?没有名为 Generator 的成员

转载 作者:可可西里 更新时间:2023-11-01 02:20:06 25 4
gpt4 key购买 nike

我发现很难修复这个错误请谁能帮助我xcode 7 测试版 2

Set UITouch ? does not have a member named 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com