user2433194
user2433194

Reputation: 86

How can I get the index number of the selected row in UIPICKERVIEW (iOS)

I need the index number of the item that I have selected in my pickerview. I am able to get the row value thru objectatindex:row, however I need the index value when I click the done button that I have. Thanks

Upvotes: 1

Views: 2831

Answers (1)

user2433194
user2433194

Reputation: 86

figured it out

 _lblResult.text=
    [NSString stringWithFormat:@"%d",[self.pvTickets selectedRowInComponent:0]]

Upvotes: 1

Related Questions