How to set a default Value of a UIPickerView

前端 未结 7 1172
刺人心
刺人心 2020-12-13 05:42

I have a problem with my UIPickerView. I have 3 values in it EU AP and NA. When I start the app EU seems to be selected but when I make a NSLog(@\"%@\", [regions objec

相关标签:
7条回答
  • 2020-12-13 06:27

    I too had this problem. But apparently there is an issue of the order of method calls. You must call:

    [self.picker selectRow:2 inComponent:0 animated:YES];
    

    after calling

    [self.view addSubview:self.picker];
    
    0 讨论(0)
提交回复
热议问题