Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antoniocasero/ACPButton
UIButton subclass to easily add custom buttons to your iOS app.
https://github.com/antoniocasero/ACPButton
Last synced: 3 months ago
JSON representation
UIButton subclass to easily add custom buttons to your iOS app.
- Host: GitHub
- URL: https://github.com/antoniocasero/ACPButton
- Owner: antoniocasero
- License: mit
- Created: 2013-07-16T21:37:37.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-06-27T14:40:35.000Z (over 8 years ago)
- Last Synced: 2024-07-20T11:06:25.933Z (4 months ago)
- Language: Objective-C
- Size: 161 KB
- Stars: 151
- Watchers: 8
- Forks: 29
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ACPButton
**⚠️ Important note! This library is not maintained anymore. Feel free to keep it updated by yourself, either forking or asking for being the contributor.**
This extension of UIButton allow you to have full control of your project buttons from one class. This class give you the oportunity to create buttons completly image free, combining flat color, gradients, borders etc. You also can create easily buttons using resizable images.
![](Screenshot1.png)
## Instalation
### From [CocoaPods][1]
pod `ACPButton`
### From source
Clone the repository
[*$ git clone [email protected]:antoniocasero/ACPButton.git*]()
Or just drag this class to your project and import `ACPButton` to your viewcontroller.
## Implementing
In the storyboard or XIB file, select your button and change the button class to ACPButton
![](Screenshot2.png)
Then, on viewDidLoad you can set up the button depending of yor needs,
* ```- (void) setStyleType:(ACPButtonType)style;```
* `- (void) setFlatStyleType:(ACPButtonType)style;`
* `- (void) setFlatStyle:(UIColor*)normal andHighlightedColor:(UIColor*)highlight;`
* `- (void) setStyle:(UIColor*)topColor andBottomColor:(UIColor*)bottomColor;`
* `- (void) setStyleWithImage:(NSString*)image highlightedImage:(NSString*)hImage disableImage:(NSString *)dImage andInsets:(UIEdgeInsets)insets;`
* ```- (void) setGlowHighlightedState:(BOOL)glowOption;```## Compatibility
- Supports ARC. If you want to use it in a project without ARC, mark ACPButton.m with the linker flag-fobjc-arc.
- Compatible with iOS5+.## License
`ACPButton` is available under the MIT license. See the LICENSE file for more info.
[1]: http://www.cocoapods.org
[1]: Screenshot1.png
[2]: Screenshot2.png[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/antoniocasero/ACPButton/trend.png)](https://bitdeli.com/free "Bitdeli Badge")