Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

MCBouncyButton

MCBouncyButton in action.

It's a button! For iOS! And it bounces delightfully!

Install

pod 'MCBouncyButton'

Usage

- (id)initWithImage:(UIImage *)image andRadius:(float)radius;
// OR
- (id)initWithText:(NSString *)text andRadius:(float)radius;

Then you can change styles with

- (void)setStyle:(MCBouncyButtonStyle)style animated:(BOOL)animated;

Where MCBouncyButtonStyle is defined as:

typedef enum {
    MCBouncyButtonStyleDefault,
    MCBouncyButtonStyleSelected
} MCBouncyButtonStyle;

MCBouncyButton will automatically create a negative of your supplied image to use for the selected style.

Properties

You can change the following properties of the button.

Button Properties

  • defaultBodyColor - default button body color (default a system grey)
  • defaultShadowColor - default button shadow color (default a system grey)
  • defaultTextColor - default text color (default black)
  • selectedBodyColor - selected button body color (default a happy blue)
  • selectedShadowColor - selected button shadow color (default a happy blue)
  • selectedTextColor - selected text color (default white)
  • relativeIconInset - distance to inset provided icon based on diameter (default 0.2f);

Animation Properties

  • scaleValue - maximum value to scale button when pressed (default 0.9f)
  • buttonBounciness - POP bounciness value (default 20.0f)
  • buttonSpeed - POP speed value (default 15.0f)

About

📱 A delightfully bouncy button.

Resources

License

Releases

No releases published
You can’t perform that action at this time.