开发者

How to handle time control in iPhone programming

开发者 https://www.devze.com 2023-01-07 19:58 出处:网络
Any idea on how to customize the UIDatePicker with single column with list of events in it,and user should be able to select one among it ? Let me know some details about it. or exam开发者_StackOverfl

Any idea on how to customize the UIDatePicker with single column with list of events in it,and user should be able to select one among it ? Let me know some details about it. or exam开发者_StackOverflowple related to it.

Thank You


In code:
UIDatePicker has the datePickerMode property exactly for this reason.
You can set it with UIDatePickerModeTime.

In Interface Builder:
The top property in Date Picker Attributes window is Mode - choose Time.


You can use any of these

UIDatePickerModeDate, // Displays month, day, and year depending on the locale setting (e.g. November | 15 | 2007)

UIDatePickerModeDateAndTime,    // Displays date, hour, minute, and optionally AM/PM designation depending on the locale setting (e.g. Wed Nov 15 | 6 | 53 | PM)

Like this

datePicker.datePickerMode = UIDatePickerModeDateAndTime;
0

精彩评论

暂无评论...
验证码 换一张
取 消