Skip to content

Files

Latest commit

0e23fe0 · Jul 29, 2015

History

History
31 lines (19 loc) · 685 Bytes

README.md

File metadata and controls

31 lines (19 loc) · 685 Bytes

UIButton+BackgroundColor

A category or extension for UIButton to set solid background color as background image.

Installation

CocoaPods

Add this to your Podfile

pod 'UIButton+BackgroundColor'

Usage

Import <UIButton+BackgroundColor.h>, then you can set background color with state for your UIButton using:

[self.blueButton setBackgroundColor:[UIColor blueColor] forState:UIControlStateNormal];

You can also set background color default appearance for UIButton

[[UIButton appearance] setBackgroundColor:[UIColor blueColor] forState:UIControlStateNormal];

Contact

@luugiathuy