Cocoa touch(十一):UISwitch
NS_CLASS_AVAILABLE_IOS(2_0) @interface UISwitch : UIControl <NSCoding> { @private id _control; } @property(nonatomic, retain) UIColor *onTintColor NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; @property(nonatomic, retain) UIColor *tintColor NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR; @property(nonatomic, retain) UIColor *thumbTintColor NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR; @property(nonatomic, retain) UIImage *onImage NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR; @property(nonatomic, retain) UIImage *offImage NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR; @property(nonatomic,getter=isOn) BOOL on; - (id)initWithFrame:(CGRect)frame; // This class enforces a size appropriate for the control. The frame size is ignored. - (void)setOn:(BOOL)on animated:(BOOL)animated; // does not send action @end