Cocoa Dev
Cocoa Dev

Reputation: 9541

UIPickerView with 2 components

I have a UIPickerView with 2 components

The default value of both components is selected to the initial index.

How can I set the 1st component to the second index and leave the 2nd component on the 4th item.

-- UPDATE --

I added

[currencyPicker selectRow:1 inComponent:0 animated:YES];

to

viewDidLoad

and now the elements in my UIPicker do not load

Upvotes: 0

Views: 535

Answers (1)

Rayfleck
Rayfleck

Reputation: 12106

You can tell it to go to a specific row, like this:

 [myPickerView selectRow:_my_row_ inComponent: _1st_component animated:YES];

Upvotes: 2

Related Questions