Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 5 days 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 (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-04-14T21:05:43.000Z (over 7 years ago)
- Last Synced: 2024-12-15T13:14:07.653Z (9 days ago)
- Topics: ibdesignable, ios, tvos, uibutton, uibutton-subclass
- Language: Ruby
- Size: 108 KB
- Stars: 3
- Watchers: 3
- 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
----![alt tag](https://github.com/cemolcay/OptionButton/blob/master/ios.png?raw=true)
![alt tag](https://github.com/cemolcay/OptionButton/blob/master/ib.png?raw=true)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.