Limits the maximum number of buttons that can be selected.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Image
LimitButtonSelect.xcodeproj
LimitButtonSelect
LimitSelectDemo
.gitignore
.swift-version
License
LimitButtonSelect.podspec
README.md

README.md

LimitButtonSelect

Version License: MIT Platform Swift 3.0

Intoduction

demo demo

Requirements

LimitButtonSelect is written in Swift 3. Compatible with iOS 9.0+

Usage

The basic usage is to put the number of selectable buttons and buttons into an array.

limitButtonSelect = LimitButtonSelect(limit: 1, buttons: [button1, button2, button3])

If you want to preselect it, you can use it as shown below.

limitButtonSelect2 = LimitButtonSelect(limit: 3, buttons: [button4, button5, button6, button7, button8, button9], defaultIndex: [2,4])

When touching the button, use the on () method.

limitButtonSelect2.on(button: sender)

When you want to return selected buttons, you can use the selectedButton () method.

limitButtonSelect.selectedButton()

Installation

Cocoapods

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

pod 'LimitButtonSelect'

Author

kaskay

License

LimitButtonSelect is available under the MIT license.