Skip to content

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

License

Notifications You must be signed in to change notification settings

luugiathuy/UIButton-BackgroundColor

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published