A quick and dirty "flat" (but somewhat bouncy!) button. MIT license, Safety not Guaranteed.
- You only need the
JTFlatButton.h
andJTFlatButton.m
files. Copy them into your project.
JTFlatButton *button = [JTFlatButton flatButton];
//This is the colour of the button
button.buttonColor = [UIColor colorWithRed:0.353 green:0.635 blue:0.843 alpha:1];
//This is the side of the button
button.sideColor = [UIColor colorWithRed:0.318 green:0.494 blue:0.686 alpha:1];
button.frame = CGRectMake(100, 100, 200, 60);
//This is how tall the button is
button.depth = 3.0f;
//This is how round the button is
button.cornerRadius = 6.0f;
[button setTitle:@"Le Button" forState:UIControlStateNormal];