Objective - C 小谈:UISwitch的基本用法
* UISwitch继承自UIControl,因此也能像UIButton一样监听一些事件,比如状态改变事件
* UISwitch可以通过拖线监听状态改变
* UISwitch可以通过addTarget: 监听状态改变
- (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents; // 其中controlEvents参数传递的是:UIControlEventValueChanged(值改变事件)