cocos2d disable touches to all other views

来源:互联网 发布:我国网络安全法 编辑:程序博客网 时间:2024/06/05 23:05
just add a invisable layer which swallowtouches.
注:Whenyou register CCTouchDispatcher you have to use lower priority thanyour containing layer if you want to swallow all touches. Latestcocos2d uses kCCMenuHandlerPriority (whichis -128) for menus. So, if you have menu items in parent layer,register CCTouchDispatcher with prioritye.g. kCCMenuHandlerPriority-1and it will swallow all touches
0 0
原创粉丝点击