How to deleselect a row from UIPickerview

后端 未结 5 1387
死守一世寂寞
死守一世寂寞 2021-01-25 04:36

Hi I am using picker view, by default it is selecting the first row. I don\'t want this option. For example I am having \"No\" and \"yes\" options.If i give this op

5条回答
  •  终归单人心
    2021-01-25 05:11

    In the viewDidLoad add this line

    [picker selectRow:**selectedRow** inComponent:0 animated:YES];
    

    Note:selectedRow is the row number which you want to show as selected.

提交回复
热议问题