Latest 0.2.0
Homepage https://github.com/harushuu/SHButton
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

CI Status
Version
License
Platform

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.

Latest podspec

{
    "name": "SHButton",
    "version": "0.2.0",
    "summary": "A simple custom button inspired by iTunes for iOS 10.",
    "homepage": "https://github.com/harushuu/SHButton",
    "screenshots": "https://github.com/harushuu/SHButton/raw/master/Screenshots.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "@harushuu": "[email protected]"
    },
    "source": {
        "git": "https://github.com/harushuu/SHButton.git",
        "tag": "0.2.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "SHButton/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This