1.UIButton在iOS8以上可以避免
// 避免同一界面多个按钮同时被点击
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0f) {
[[UIButton appearance] setExclusiveTouch:YES];
}
加在didFinishLaunchingWithOptions 里可以避免多个按钮被同时点击
支持iOS8 以上 需要的可以加一下
http://blog.csdn.net/lizhilin_vip/article/details/51780691
给naviviewcontroller加上- (void)pushViewController:(UIViewController*)viewControlleranimated:(BOOL)animated {
if(self.pushing==YES) {
NSLog(@"被拦截");
return;
}else{
NSLog(@"push");
self.pushing=YES;
}
[superpushViewController:viewControlleranimated:animated];
}
3.防止button被点击多次
http://www.jianshu.com/p/7bca987976bd