开发者

How to handle time control in iPhone programming

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜