How To Get Selected Value From UIPickerView

后端 未结 10 2205
梦如初夏
梦如初夏 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:42

    You can access the selected row for a given component using the following method:

    - (NSInteger)selectedRowInComponent:(NSInteger)component
    

    Otherwise, implementing the delegate function is the only other option.

提交回复
热议问题