https://github.com/swordray/uibuttonsetbackgroundcolorforstate
UIButton set background color for state extension in Swift/OC.
https://github.com/swordray/uibuttonsetbackgroundcolorforstate
ios uibutton uikit
Last synced: about 1 year ago
JSON representation
UIButton set background color for state extension in Swift/OC.
- Host: GitHub
- URL: https://github.com/swordray/uibuttonsetbackgroundcolorforstate
- Owner: swordray
- License: mit
- Created: 2016-06-06T12:07:30.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2022-01-29T04:29:59.000Z (over 4 years ago)
- Last Synced: 2025-04-13T14:23:36.819Z (about 1 year ago)
- Topics: ios, uibutton, uikit
- Language: Objective-C
- Homepage:
- Size: 18.6 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UIButtonSetBackgroundColorForState
[](http://cocoapods.org/pods/UIButtonSetBackgroundColorForState)
[](http://cocoapods.org/pods/UIButtonSetBackgroundColorForState)
[](http://cocoapods.org/pods/UIButtonSetBackgroundColorForState)
Add method setBackgroundColor:forState: to UIButton.
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
- iOS 7 or later
## Installation
UIButtonSetBackgroundColorForState is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod "UIButtonSetBackgroundColorForState"
```
## Usage
```objc
- (void)setBackgroundColor:(nullable UIColor *)color forState:(UIControlState)state;
```
## Author
Jianqiu Xiao, swordray@gmail.com
## Sponsors
* [BaiLu ShuYuan](https://bailushuyuan.org)
## License
UIButtonSetBackgroundColorForState is available under the MIT license. See the LICENSE file for more info.