mostworld77
mostworld77

Reputation: 427

Swift: UIPickerview selecting row-id / Index

im tried to get the selected row-id / Index from the pickerview, but i get only the name of the selected row.

I've search on the web and documentation without results.

How can i get the ID of the selected row ? thanks

Upvotes: 1

Views: 2010

Answers (1)

gutenmorgenuhu
gutenmorgenuhu

Reputation: 2362

Use selectedRowInComponent(_:

I quote from the UIPickerView Class reference:

Returns the index of the selected row in a given component.

Upvotes: 2

Related Questions