iphone - UIDatePickerModeCountDownTimer 模式下的 UIDatePicker : how to change to minutes and seconds mode?

标签 iphone storyboard uidatepicker

我在 Storyboard中添加了 UIDatePicker,并将模式设置为 CountDownTimer。 它只显示小时和分钟,但我需要的是分钟和秒模式。 我不需要小时列,需要分钟和秒列。 我尝试更改间隔,但最小值是 1 分钟。 是否可以?我怎样才能做到这一点?

最佳答案

您可以为分秒选择器创建数据源。它有两个组成部分:分钟和秒。您必须实现 UIPickerViewDelegate 和 UIPickerViewDataSource 协议(protocol)中的一些方法。

Apple的示例代码UICatalog.app供您引用。您可以找到有关如何创建自定义选择器的示例。

关于iphone - UIDatePickerModeCountDownTimer 模式下的 UIDatePicker : how to change to minutes and seconds mode?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11501793/

相关文章:

xcode - 什么是 StoryBoard ID,我该如何使用它?

wpf - 将 LinearGradientBrush 而不是纯色设置为 VisualState 中的 storyboard.targetProperty

ios - UIDatePicker 更改 "today"日期文本的颜色

iphone - 检测过去的 UIAlertView

iOS 7 : Misplaced View Frame for "Label - Label" will be different at run time

ios - iOS 中的日期选择器

iphone - 带选择器 View 的 UITableViewController

iphone - NSURLConnection 委托(delegate)方法

iphone - 返回内存管理日期是否正确?

iphone - 更改地址簿中人员的联系人照片