MasterCarl / SimpleRoundedButton

Simple UIButton with support for @IBInspectable attributes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SimpleRoundedButton

CI Status Version License Platform

SimpleRoundedButton is a UIButton subclass that uses @IBInspectable attributes to allow easy customization of border properties, colors and corner radius, directly from the Storyboard. Inspired by KBRoundedButton, but making use of XCode's @IBInspectable feature.

XCode properties

Shaped like a Text Field Or nicely rounded

The corner radius is automatically constrained to half the button height or width. To achieve completely rounded sides, just set the value to something like 100.

Activity Indicator

Additionally, SimpleRoudedButton has a simple function to show a UIActivityIndicator.

Or nicely rounded

import SimpleRoundedButton

button.startAnimating() 

// do some stuff

button.stopAnimating() 

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

SimpleRoundedButton is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "SimpleRoundedButton"

Usage

To use SimpleRoundedButton, simply assign SimpleRoundedButton as the custom class in the identity inspector. You need to set class and model.

Setting the custom class

Apps using this control

If you're using this control, I'd love hearing from you!

Author

Carl Gödecken, dev@mastercarl.com

License

SimpleRoundedButton is available under the MIT license. See the LICENSE file for more info.

About

Simple UIButton with support for @IBInspectable attributes

License:MIT License


Languages

Language:Shell 61.7%Language:Swift 24.7%Language:Ruby 8.3%Language:Objective-C 5.3%