You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Roland Moers edited this page Oct 31, 2016
·
1 revision
Selecting a default value is rather easy. The UIPickerView is available through the picker property and can be used to select a default row. The following code gives an example on how to implement this.
Example
Objective-C
//Create select action
...
//Create picker view controller
RMPickerViewController *pickerController = [RMPickerViewController actionControllerWithStyle:style selectAction:selectAction andCancelAction:cancelAction];
pickerController.picker.delegate = self;
pickerController.picker.dataSource = self;
[pickerController.picker selectRow:<#some index#> inComponent:<#some component#> animated:NO];
//Now just present the picker controller using the standard iOS presentation method
[selfpresentViewController:pickerController animated:YEScompletion:nil];