// [headerView.mSwitch performSelector:@selector(switchValueChange:) withObject:dic];
这个方法是直接去调用的,
而,
headerView.mSwitch addTarget:self action:@selector(switchValueChange:item) forControlEvents:<#(UIControlEvents)#>
这个方法是 跟 事件 结合在一块的
// [headerView.mSwitch performSelector:@selector(switchValueChange:) withObject:dic];
这个方法是直接去调用的,
而,
headerView.mSwitch addTarget:self action:@selector(switchValueChange:item) forControlEvents:<#(UIControlEvents)#>
这个方法是 跟 事件 结合在一块的
转载于:https://www.cnblogs.com/guligei/p/3161031.html