Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
CCMenuItemImage 将在按下它的触摸释放它后调用选择器。
但是,触摸按下它就不能让它调用选择器吗?这是为了在菜单中创建更快的效果。
子类 CCMenuItemImage 并处理事件
-(void) selected{ // do you thing : for example you could have a target:selector pair of // properties added in your implementation. [super selected]; }
我用它来检测长触摸并弹出上下文工具提示窗口(例如)。