使用 CocoaPods,将此行添加到您的 Podfile
。
pod 'SHButton', '~> 0.2.0'
然后运行 pod install
,完成后即可!
SHButton *button = [[SHButton alloc] init];
受 iOS 10 的 iTunes 启发的一个简单自定义按钮。
下一个版本将添加更多自定义选项。
智能颜色将自动设置阴影颜色,与您的背景颜色或标题颜色进行比较。
享受自己!
###custom
// default is YES; If NO, default shadowColor is lightGrayColor with alpha = 0.6;
@property (nonatomic, assign) BOOL smartColor;
// default scale is YES;
@property (nonatomic, assign) BOOL showShadowAnimation;
// If set YES, minShadowCircleValue = 1.1f && maxShadowCircleValue = 1.1f;
@property (nonatomic, assign, getter=isOriginScale) BOOL originScale;
// If smartColor is NO, default shadowColor is lightGrayColor with alpha = 0.6;
@property (nonatomic, strong) UIColor *shadowColor;
// default scale is 0.6;
@property (nonatomic, assign) CGFloat shadowColorAlpha;
// default scale is 0.9;
@property (nonatomic, assign) CGFloat scaleValue;
// default is 0.25;
@property (nonatomic, assign) CGFloat showAnimationDuration;
// default is 0.4;
@property (nonatomic, assign) CGFloat cancelAnimationDuration;
// default is 1.3;
@property (nonatomic, assign) CGFloat minShadowCircleValue;
// default is 1.5;
@property (nonatomic, assign) CGFloat maxShadowCircleValue;
@harushuu, [email protected]
英文:SHButton 可在 MIT 许可下获得,有关更多信息,请参阅 LICENSE 文件。