TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Sep 2015 |
Maintained by Max Kramer.
UIButton, but bouncier and capable for use with your own icons and attributed text.
Video of what she looks like in action can be found here!
Copy the files CINBouncyButton.{h,m}
to your project.
Import the header, instantiate an instance of CINBouncyButton
, add it as a subview, and feel your jaw drop in amazement.
#import "CINBouncyButton.h"
@implementation XYZ
- (void)viewDidLoad {
UIImage *buttonImage = [UIImage imageNamed:@"icon_twitter"];
NSAttributedString *buttonTitle = [[NSAttributedString alloc] initWithString:@"Connect on Twitter!" attributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
CINBouncyButton *twitterButton = [[CINBouncyButton alloc] initWithFrame:CGRectMake(40.0f, 40.0f, 250.0f, 40.0f) image:buttonImage andTitle:buttonTitle];
[twitterButton setBackgroundColor:[UIColor blueColor]];
[self.view addSubview:twitterButton];
[super viewDidLoad];
}
@end
Make sure that you run pod install
before attempting to build and run the project.
Tacky Gif (Please see video instead!):