【发布时间】:2015-05-02 09:44:00
【问题描述】:
userInteractionEnabled 似乎只禁用触摸?如果我们需要忽略点击和触摸怎么办?是否有类似于 userInteractionEnabled 的属性也会导致点击被忽略?这是给 Swift 的。
【问题讨论】:
标签: ios swift sprite-kit
userInteractionEnabled 似乎只禁用触摸?如果我们需要忽略点击和触摸怎么办?是否有类似于 userInteractionEnabled 的属性也会导致点击被忽略?这是给 Swift 的。
【问题讨论】:
标签: ios swift sprite-kit
您可以使用UIApplication.sharedApplication 中的beginIgnoringInteractionEvents:
//Start ignoring
UIApplication.sharedApplication().beginIgnoringInteractionEvents()
要结束忽略,您可以简单地使用endIgnoringInteractionEvents
//End Ignoring
UIApplication.sharedApplication().endIgnoringInteractionEvents()
【讨论】: