ios cell上的定时器怎么销毁

2025-03-04 16:02:25
推荐回答(1个)
回答1:

比如按下按钮 10秒后 才能继续点击。 -(void) buttonPressed{ button.enabled = NO; [NSTimer scheduledTimerWithTimeInterval:10.0f target:self selector:@selector(buttonPress) userInfo:nil repeats:NO]; } -(void) buttonPress{ button.enabled = YES; }