performSelector,addTarget

                   // [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