https://github.com/rickytan/rticonbutton
A Interface Builder configurable UIButton with a image icon
https://github.com/rickytan/rticonbutton
alignment button icon icon-position uibutton
Last synced: 12 months ago
JSON representation
A Interface Builder configurable UIButton with a image icon
- Host: GitHub
- URL: https://github.com/rickytan/rticonbutton
- Owner: rickytan
- License: mit
- Created: 2015-10-16T09:43:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-01-21T05:27:20.000Z (over 7 years ago)
- Last Synced: 2025-06-06T02:30:45.486Z (about 1 year ago)
- Topics: alignment, button, icon, icon-position, uibutton
- Language: Objective-C
- Size: 234 KB
- Stars: 41
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RTIconButton
[](https://travis-ci.org/rickytan/RTIconButton)
[](http://cocoapods.org/pods/RTIconButton)
[](http://cocoapods.org/pods/RTIconButton)
[](http://cocoapods.org/pods/RTIconButton)
This is a drop-in replacement for `UIButton`, which support convenient configuration for image icon's position and icon title margin.
It also support control centent aligns.
**NOTE:** To support IB, you must set use_frameworks! in your Podfile.

## Usage
1. Drag and drop a `UIButton` to your controller
2. set the **Class** to `RTIconButton`
3. set the icon position, icon margin and icon size. If size is not specified, it will displayed in the image natural size.


To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
- **UIKit**
- **Xcode 6**
## Installation
RTIconButton is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod "RTIconButton"
```
## License
RTIconButton is available under the MIT license. See the LICENSE file for more info.