UISwitch属性1.onTintColor处于on时switch的颜色switchImage.onTintColor=[UIColorgrayColor];2.tintColor处于off时switch的颜色switchImage.tintColor=[UIColorgreenColor];3.onImage设置on的图标switchImage.onImage=[UIImageimageNamed:@"1.png"];4.offImage设置off的图标switchImage.offImage=[UIImageimageNamed:@"4.png"];5.on设置switch的开关swithImage.on=YES;6.thumbTintColor设置拇指颜色swithImage.thumbTintColor=[UIColorredColor];效果:7.增加事件响应机制监听的是这个事件:UIControlEventValueChanged,值改变事件[switchImageaddTarget:selfaction:@selector(switchOn)forControlEvents:UIControlEventValueChanged];