Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

maxkramer/CINBouncyButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CINBouncyButton

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!

Screenshot of the button

#Installation ##CocoaPods

Simply add the following to your Podfile

pod 'CINBouncyButton', '~>1.0.0'

##Manually

Copy the files CINBouncyButton.{h,m} to your project.

#Usage

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

#Example Project

Make sure that you run pod install before attempting to build and run the project.

Tacky Gif (Please see video instead!):

Example

About

UIButton, but bouncier and with your own icons.

Resources

License

Stars

Watchers

Forks

Packages

No packages published