You can create buttons with colors using a button layer. First add the QuartzCore framework project to the project. Then add #import <QuartzCore/QuartzCore.h> to the view class. To make a red button, do it
UIButton *myButton = [UIButton buttonWithType: UIButtonTypeCustom]; [myButton setFrame: CGRectMake(10.0f, 10.0f, 300.0f, 44.0f)]; [[myButton layer] setBackgroundColor: [[UIColor redColor] CGColor]]; [self addSubview: myButton]; [myButton release];
Hope this helps!
source share