addTargetedDelegate:self中的swallowsTouches
2013-07-04 09:17
363 查看
关于swallowsTouches
[[CC sharedDispatcher] addTargetedDelegate:self priority:kCCMenuTouchPriority swallowsTouches:YES];
如果 swallowsTouches:YES && touch begin return yes
那么他的move 和end就接受,,别的类就不再接受了。
如果swallowsTouches:NO &&begin return yes
那么他的move 和end就接受,别的类就仍然可以接受。
[[CC sharedDispatcher] addTargetedDelegate:self priority:kCCMenuTouchPriority swallowsTouches:YES];
如果 swallowsTouches:YES && touch begin return yes
那么他的move 和end就接受,,别的类就不再接受了。
如果swallowsTouches:NO &&begin return yes
那么他的move 和end就接受,别的类就仍然可以接受。
相关文章推荐
- addTargetedDelegate:self中的swallowsTouches
- addTargetedDelegate:self 中的 swallowsTouches
- addTargetedDelegate:self 中的 swallowsTouches
- addTargetedDelegate:self 中的 swallowsTouches
- addTargetedDelegate:self中的swallowsTouches
- cocos2dx 不要直接在 onEnter 里面 addTargetedDelegate (或 addStandardDelegate)
- cocos2d-x-2.*关于addTargetedDelegate的两个坑
- cocos2d-x touches事件中使用 addTargetedDelegate 的潜在bug
- Cocos2dx的addTargetedDelegate方法的参数
- cocos2dx 不用直接在 onEnter 里面 addTargetedDelegate (或 addStandardDelegate)
- 一篇好文章关于onEnter与addTargetedDelegate
- cocos2dx 不要直接在 onEnter 里面 addTargetedDelegate (或 addStandardDelegate)
- cocos2d-x touches事件中使用 addTargetedDelegate 的潜在bug
- cocos2d 学习笔记 - 【转载】cocos2dx 不要直接在 onEnter 里面 addTargetedDelegate (或 addStandardDelegate)
- [self.view addSubview:vc2.view]程序崩溃的解决办法
- CCTouchDelegateProtocol(CCTouchDelegate触摸事件委托 两子类:1CCTargetedTouchDelegate,2CCStandardTouchDelegate)
- Cocos-2d CCLayer的触摸响应CCTouchDelegate和CCStandardTouchDelegate 和 CCTargetedTouchDelegate
- iOS bug解决 Can't add self as subview
- iphone - self.window.rootViewController vs window addSubview
- JQuery包装集size,length,index,slice,find,filter,is,children,next,nextAll,parent,parents,closest,siblings,add,end,andSelf的用法