[英]SpriteKit: property for disabling taps and touches?
userInteractionEnabled
似乎仅禁用触摸? 如果我们需要忽略轻触,该怎么办? 是否存在类似于userInteractionEnabled的属性,该属性也会导致水龙头被忽略? 这是给Swift的。
您可以使用UIApplication.sharedApplication
的beginIgnoringInteractionEvents
:
//Start ignoring
UIApplication.sharedApplication().beginIgnoringInteractionEvents()
要结束忽略,您可以简单地使用endIgnoringInteractionEvents
//End Ignoring
UIApplication.sharedApplication().endIgnoringInteractionEvents()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.