How To Get Selected Value From UIPickerView

后端 未结 10 2264
梦如初夏
梦如初夏 2020-12-04 11:41

I know that with a UIDatePicker, you can use something like:

NSDate *myDate = picker.date;

But I am using a UIPickerView in my view. How c

10条回答
  •  广开言路
    2020-12-04 12:19

    You have to use the didSelectRow delegate method, because a UIPickerView can have an arbitrary number of components. There is no "objectValue" or anything like that, because that's entirely up to you.

提交回复
热议问题