Flat Buttons – An iOS Control for a Flat UI

With the announcement on iOS 7 and the growing trend towards flat UI, I decided to create a simple iOS control to create flat buttons. The control can be downloaded from Github and can be used in any iOS project.
Using the control is as simple as it gets. Once you download the project, copy the files FlatButton.h and FlatButton.m into your project. Import FlatButton.h where you plan to create the flat buttons.

#import "FlatButton.h"

To create flat buttons use the following code:

FlatButton *flatBtn = [[FlatButton alloc] initWithFrame:CGRectMake(10,10,148,100) withBackgroundColor:[UIColor grayColor]];
[self.view flatBtn];

Thats all you basically need to use the control. FlatButton is a subclass of UIButton so it contains all the same properties as a regular button. For example to add text you would use the following code:

[flatBtn setTitle:@"Tile Button" forState:UIControlStateNormal];


  • ARC
  • QuartzCore.framework

Source code: https://github.com/ijason/FlatButtons

Feel free to use this control, modify it or improve on it any way you can.


One Reply to “Flat Buttons – An iOS Control for a Flat UI”

Leave a Reply

Your email address will not be published. Required fields are marked *

Please Do the Math