如何自定义UIDatePicker的日期格式显示?

时间:2016-11-25 03:41:51

标签: ios iphone uidatepicker

问题是我想在iOS系统中自定义显示UIDatePicker的日期格式。因为系统只提供了四种模式显示如下:

typedef NS_ENUM(NSInteger, UIDatePickerMode) {

    UIDatePickerModeTime,           // Displays hour, minute, and optionally AM/PM designation depending on the locale setting (e.g. 6 | 53 | PM)

    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)

    UIDatePickerModeCountDownTimer, // Displays hour and minute (e.g. 1 | 53)

} __TVOS_PROHIBITED;

系统的用户界面效果:

enter image description here

我想自定义格式显示,图片如下: enter image description here

任何人都可以帮我一个忙吗?或者给我一些想法。非常感谢。

0 个答案:

没有答案