1、Button 或者 添加Button的视图的 userInteractionEnabled 属性为NO;改为YES即可。
2、修改Button的frame时,Button的frame超过父View的frame。 将Button的frame调整到不超过父View的frame即可。
3、Button上面添加view,view将拦截点击事件。将view的userInteractionEnabled设为NO即可。
1、Button 或者 添加Button的视图的 userInteractionEnabled 属性为NO;改为YES即可。
2、修改Button的frame时,Button的frame超过父View的frame。 将Button的frame调整到不超过父View的frame即可。
3、Button上面添加view,view将拦截点击事件。将view的userInteractionEnabled设为NO即可。