Closed fabriciomasiero closed 7 years ago
Hi @fabriciomasiero, No there currently isn't a way to do that but it seems like a very valid use case. I like it!
Could probably accomplish this pretty easily by adding something like
public var pickerSelectRowsForComponents: [Int:[Int:Bool]]? {
didSet {
for component in pickerSelectRowsForComponents!.keys {
if let row = pickerSelectRowsForComponents![component]?.keys.first, let isAnimated = pickerSelectRowsForComponents![component]?.values.first {
picker.selectRow(row, inComponent: component, animated: isAnimated)
}
}
}
}
I'll make a branch and get it going!
@fabriciomasiero check out 0.4.0
.
I've added
mcPicker.pickerSelectRowsForComponents = [
0: [3: true],
1: [2: true] // [Component: [Row: isAnimated]
]
For this use case.
Hi,
There is a way to init the McPicker with custom selection index? Like, open Picker in position 10 of Array data
Thanks