I am trying to figure out how to show the selected row when i open UIPickerView
after it has been selected last time.
When I open my PickerView again, I want my UIPickerView
to set selected row which I choose at last time.
Is there any way in Swift?
UIPickerView api allow you to select row in any component in code:
func selectRow(_ row: Int,
inComponent component: Int,
animated animated: Bool)
So if you stored selected indices for your picker's components just call this method for each component before you show picker again.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments