首页 > 代码库 > Xcode中设置按钮在十分钟之内禁用

Xcode中设置按钮在十分钟之内禁用

btn.enabled=NO;`

NSTimer * notificationTimer = [NSTimer scheduledTimerWithTimeInterval:10*60.0 target:selfselector:@selector(enable) userInfo:nil repeats:No];

-(void)enable { btn.enabled=YES; }