To run the example project, clone the repo, and run pod install
from the Example directory first.
LMMSwitch is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'LMMSwitch', '~> 1.1.0'
/// 开关开启状态的顶部滑块颜色 默认白色
@property (nonatomic, strong) UIColor *onTintColor;
/// 开关关闭状态的顶部滑块颜色 默认白色
@property (nonatomic, strong) UIColor *offTintColor;
/// 开关开启状态的底部背景颜色 默认绿色
@property (nonatomic, strong) UIColor *onBackgroundColor;
/// 开关关闭状态的底部背景颜色 默认lightGrayColor
@property (nonatomic, strong) UIColor *offBackgroundColor;
/// 开关开启状态的的图片,设置后onTintColor无效
@property (nonatomic, strong) UIImage *onImage;
/// 开关关闭状态的的图片,设置后offTintColor无效
@property (nonatomic, strong) UIImage *offImage;
/// 开关边框颜色 默认无
@property (nonatomic, strong) UIColor *tintColor;
/// 开关的内边距,默认3,5,3,5
@property (nonatomic, assign) UIEdgeInsets padding;
LMMSwitch is available under the MIT license. See the LICENSE file for more info.