MillerApps / MARoundButton

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MARoundButton

CI Status Version License Platform

Installation

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

pod 'MARoundButton'

How To Use

MARoundButton can be used through StoryBoards by adding a UIButton to the View and under the identity inspector select MARoundButton as the class and the module. All the properties can be changed within the attributes inspector tab.

MARoundButton can also be used through code just like a normal UIButton. Just remember to set the Round button properties.

StoryBoard Example

StoryBoard

Swift Example

First import MARoundButton

import MARoundButton

Next setup a button similar to the following:

let btn = MARoundButton(frame: CGRect(x: 20, y: 40, width: 50, height: 50))
btn.backgroundColor = UIColor.brown
btn.setTitle("BTN", for: .normal)
btn.tintColor = UIColor.white
        
// MARoundButton
btn.borderColor = UIColor.black
btn.border = 2
btn.corner = 23
btn.borderAlpha = 0.5
        
self.view.addSubview(btn)

TODO

  • Finish documentation
  • Add a demo project
  • Add code demo for Objective-C

Author

Tyler Miller

License

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

About

License:MIT License


Languages

Language:Shell 62.0%Language:Swift 28.4%Language:Ruby 5.3%Language:Objective-C 4.2%