UIDatePicker DidSelectRow Method?

后端 未结 3 1728
栀梦
栀梦 2021-01-12 05:53

I know UIPickerViews use a didSelectRow method to update labels etc when a row is selected.

I have a UIDatePicker that updates a label when a row is selected and don

3条回答
  •  甜味超标
    2021-01-12 06:26

    A date picker does things a little differently. From the documentation:

    When properly configured, a UIDatePicker object sends an action message when a user finishes rotating one of the wheels to change the date or time; the associated control event is UIControlEventValueChanged.

    Because a UIDatePicker inherits from UIControl, you have access to all the various touch events you'd expect (TouchUpInside, etc).

提交回复
热议问题