How to set Minimum time to appear as default in UIDatepicker everytime

前端 未结 5 698

In Datepicker i have set Min and Max time where uidatepicker can scroll for example i have set 3:00PM as minimum time and 8:00PM as maximum time , when i run the app i want

5条回答
  •  孤城傲影
    2020-12-11 13:12

    The UIDatePicker class has a setDate:animated: method that you can use to set the date to whatever date/time you want on the date picker instance.

    More info: http://developer.apple.com/library/ios/documentation/uikit/reference/UIDatePicker_Class/Reference/UIDatePicker.html#//apple_ref/doc/uid/TP40006806-CH3-SW1

提交回复
热议问题