SHButton 0.2.0

SHButton 0.2.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Sep 2017

Maintained by harushuu.




SHButton 0.2.0

  • By
  • @harushuu

Screenshots

image

Installation

With CocoaPods, add this line to your Podfile.

pod 'SHButton', '~> 0.2.0'

and run pod install, then you're all done!

How to use

SHButton *button = [[SHButton alloc] init];

Summary

A simple custom button inspired by iTunes for iOS 10.

Will add more custom option in next version.

Smart color will auto set shadow color compare with your background color or title color.

Enjoy yourself!

###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;

Requirements

  • iOS 8.0+
  • ARC

Author

@harushuu, [email protected]

License

English: SHButton is available under the MIT license, see the LICENSE file for more information.