Skip to content

A simple custom button inspired by iTunes for iOS 10.

License

Notifications You must be signed in to change notification settings

qijitech/SHButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SHButton

CI Status Version License Platform

However if you're using Swift in your project, I recommend using PBButton as it provides better type safety with a simpler API.

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, hunter4n@gmail.com

License

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

About

A simple custom button inspired by iTunes for iOS 10.

Resources

License

Stars

Watchers

Forks

Packages

No packages published