UIControl
UIControl ->可以填加响应事件 -> 不会直接使用它 ->直接使用它的子类:UIButton、UITextField、UIPageControl、UISwitch、UISegmentedControl、UISlider
1、UIControl的独有方法 addTarget
2、UIControl 以及他的子类 不能响应
1)查看有没有添加响应事件
2)查看相应事件的方法是否正确 按钮:UIControlEventTouchUpInside按下去弹起来响应 UIControlEventTouchDown按下去就会响应
3)查看是否添加到imageView上 -> userInteractionEnabled = YES
4)查看控件是否超出父视图界限
5)其他原因 参考上面的
6)方法未被发送到实例
reason: ‘-[ViewController actio]: unrecognized selector sent to instance 0x7fed51d15b00’
1、对象不能使用这个方法:
(1)没有实现调用的方法
(2)方法名写错
2、对象提前被释放
reason: ‘-[UIControl text]: unrecognized selector sent to instance 0x7fcca8f10570’
UIControl 不能使用text这个方法
对象 不能调用 某个系统方法
查看 传过来的对象 是不是 跟调用的对象 不是同一个类