https://github.com/cemolcay/optionbutton
IBDesignable option button that have vertical stacked title and option labels for iOS and tvOS.
https://github.com/cemolcay/optionbutton
ibdesignable ios tvos uibutton uibutton-subclass
Last synced: about 1 year ago
JSON representation
IBDesignable option button that have vertical stacked title and option labels for iOS and tvOS.
- Host: GitHub
- URL: https://github.com/cemolcay/optionbutton
- Owner: cemolcay
- License: mit
- Created: 2017-04-14T17:53:13.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-14T21:05:43.000Z (about 9 years ago)
- Last Synced: 2025-04-06T10:53:24.271Z (about 1 year ago)
- Topics: ibdesignable, ios, tvos, uibutton, uibutton-subclass
- Language: Ruby
- Size: 108 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
OptionButton
===
IBDesignable option button that have vertical stacked title and option labels for iOS and tvOS.
Demo
----


Requirements
----
* Swift 3.0+
* iOS 9.0+
* tvOS 9.0+
Install
----
```
use_frameworks!
pod 'OptionButton'
```
Usage
----
* Create an instance of `OptionButton` from code, or drag and drop a `UIButton` to storyboard and change its class to `OptionButton`.
* It is a regular UIButton subclass with a stack view that have `nameLabel` and `optionLabel`.
* You could change the labels text, font and textColor from storyboard.
* Also you could set other properties from code.
* You could set the content insets from either storyboard or code by `leftInset`, `rightInset`, `topInset` and `bottomInset` properties.