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]; }
これを使用して、長いタッチを検出し、コンテキストツールチップウィンドウをポップします(たとえば)。