mcb

MCBouncyButton

📱 A delightfully bouncy button.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

90

Maintenance

Last Commit

6yrs ago

Contributors

1

Package

Dependencies

1

License

MIT

Categories

Readme

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)

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100