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.
- Drag and drop a
UIButton
to your controller - set the Class to
RTIconButton
- 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.
- UIKit
- Xcode 6
RTIconButton is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "RTIconButton"
RTIconButton is available under the MIT license. See the LICENSE file for more info.