Skip to content

Isaaclzg/LMMSwitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LMMSwitch

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

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;

Author

isaaclzg简书
Isaac_gang@163.com

License

LMMSwitch is available under the MIT license. See the LICENSE file for more info.

About

iOS 自定义switch

Resources

License

Stars

Watchers

Forks

Packages

No packages published