Select row After UIPickerView is loaded

后端 未结 6 1988
广开言路
广开言路 2020-12-07 22:13

I have an iPhone database app that loads a UIPickerView with data from a table. I want to set the selected row to a particular row from the data in another tab

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-07 22:23

    If you want the selected row permanently highlighted use this

    myPickerView.subviews[0].subviews[0].subviews[2].backgroundColor = myPickerView.tintColor;
    

提交回复
热议问题