Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/questbeat/QBFlatButton
Flat-Style Button
https://github.com/questbeat/QBFlatButton
Last synced: 3 months ago
JSON representation
Flat-Style Button
- Host: GitHub
- URL: https://github.com/questbeat/QBFlatButton
- Owner: nek023
- License: mit
- Archived: true
- Created: 2012-12-27T15:17:28.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2015-03-04T05:03:25.000Z (over 9 years ago)
- Last Synced: 2024-05-14T08:21:34.216Z (6 months ago)
- Language: Objective-C
- Homepage:
- Size: 217 KB
- Stars: 266
- Watchers: 16
- Forks: 31
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QBFlatButton
Flat-Style Button## Installation
QBFlatButton can be installed with [CocoaPods](http://cocoapods.org/).pod 'QBFlatButton'
Or clone this repository and include `QBFlatButton.h` in your project manually.
## ScreenShot
![screenshot.png](http://gyazo.com/69abc2f3861c87fceabc92e2ca780fd8.png)## Properties
### faceColor
A surface color of the button.`@property (nonatomic, strong) UIColor *faceColor`
### sideColor
A side color of the button.`@property (nonatomic, strong) UIColor *sideColor`
### borderColor
A border color of the button.`@property (nonatomic, strong) UIColor *borderColor`
### cornerRadius
A corner radius of the button.`@property (nonatomic, assign) CGFloat cornerRadius`
### height
A button height in normal state.`@property (nonatomic, assign) CGFloat height`
### depth
A button depth when the button pushed down.`@property (nonatomic, assign) CGFloat depth`
### borderWidth
A border width of the button.`@property (nonatomic, assign) CGFloat borderWidth`
## Example
QBFlatButton *button = [QBFlatButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(90, 200, 140, 50);button.surfaceColor = [UIColor colorWithRed:0.333 green:0.631 blue:0.851 alpha:1.0];
button.sideColor = [UIColor colorWithRed:0.310 green:0.498 blue:0.702 alpha:1.0];
button.borderColor = [UIColor colorWithRed:0.310 green:0.498 blue:0.702 alpha:1.0];
button.cornerRadius = 6.0;
button.height = 4.0;
button.depth = 3.0;
button.titleLabel.font = [UIFont boldSystemFontOfSize:16.0];
[button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[button setTitle:@"QBFlatButton" forState:UIControlStateNormal];
[self.view addSubview:button];## License
*QBFlatButton* is released under the **MIT License**, see *LICENSE.txt*.