2011-11-15 18 views

回答

0

試試這個:

[NSNotification cancelPreviousPerformRequestsWithTarget:self selector:@selector(powerHide) object:nil]; 
0

假設你同樣計劃選擇到這一點:

[self scheduleSelector:@selector(onTouch:) interval:1]; 

然後,你可以取消預定的,因爲它通過_cmd調用該方法的特定選擇:

-(void) onTouch:(ccTime)delta 
{ 
    // this will stop onTouch from being called every second 
    [self unscheduleSelector:_cmd]; 
} 
相關問題