防止UIbutton重复点击(ios)

文章来自:源码在线https://www.shengli.me/css/196.html

使用uibutton的enabled或userIteractionEnabled

使用UIButton的enabled属性, 在点击后, 禁止UIButton的交互, 直到完成指定任务之后再将其enabled即可.

[btn addTarget:self action:@selector(nextStop:) forControlEvents:UIControlEventTouchUpInside];

 

 

猜你喜欢

转载自blog.csdn.net/hugejihu9/article/details/83861837