将AM/PM添加到datepicker?

And*_*rew 5 iphone cocoa-touch objective-c uidatepicker

我的UIDatePicker被设置为UIDatePickerModeTime,但它在苹果文档中说The date picker displays hours, minutes, and (optionally) an AM/PM designation. The exact items shown and their order depend upon the locale set. An example of this mode is [ 6 | 53 | PM ]..我如何添加AM/PM,因为在我的设备上,这些不是选项而是使用24小时制?

phi*_*phi 21

这取决于用户的设置.如果您转到设置 - >常规 - >日期和时间.有一个"24小时"时间开关,基于用户将在你的选择器上有AM/PM指示器.