Skip to content

inline single and multi picker views for UIKit. Without tableview! Easy and simple.

Notifications You must be signed in to change notification settings

ibrahimyilmaz7/swift-picker-views

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

swift-picker-views

Inline single and multiple picker views for UIKit. No tableview, no data sources! Easy and simple.

Just clone and run the playground, to see it in action 💥

Using Single-Selection Picker:

/// With radius
let singleSelect = IYSinglePicker()
singleSelect.backgroundColor = .white
singleSelect.layer.cornerRadius = 10
singleSelect.data = [
    "Direct Messages",
    "Mentions",
    "Anything"
]

/// Full-width
let singleSelect = IYSinglePicker()
singleSelect.backgroundColor = .white
singleSelect.data = [
    "Direct Messages",
    "Mentions",
    "Anything"
]

Reading value of Single-Selection Picker

let selectedIndex = singleSelect.selectedIndex

image

Using Multiple-Selection Picker:

/// With radius
let multiSelect = IYMultiplePicker()
multiSelect.backgroundColor = .white
multiSelect.layer.cornerRadius = 10
multiSelect.data = [
    "Play notification sounds",
    "Send read receipts",
    "Show my online status"
]

/// Full-width
let multiSelect = IYMultiplePicker()
multiSelect.backgroundColor = .white
multiSelect.data = [
    "Play notification sounds",
    "Send read receipts",
    "Show my online status"
]

Reading value of Multiple-Selection Picker

let selectedIndexes = multiSelect.selectedIndexes

image

Releases

No releases published

Packages

No packages published

Languages