UIDatePicker返回值数据类型问题
我想从设置如下的 UIDatePicker 传回数据:
UIDatePicker *pickerView = [[UIDatePicker alloc] init];
pickerView.datePickerMode = UIDatePickerModeCountDownTimer;
选择器模式设置为倒计时器。我需要将什么类型的数据类型传回委托?
我以为它会像 pickerView.value
但我没有看到它。我是否需要获取 pickerView.date
并将其转换为 NSNumber 或其他内容?
我只想根据从 UIDatePicker 返回的值设置一个计时器...
I want to pass back data from a UIDatePicker that is setup like this:
UIDatePicker *pickerView = [[UIDatePicker alloc] init];
pickerView.datePickerMode = UIDatePickerModeCountDownTimer;
The picker mode is set to be the count down timer. What type of data type do I need to pass back to the delegate?
I was thinking it would be something like pickerView.value
But I am not seeing it. Do I need to get the pickerView.date
and cast it as an NSNumber or something?
I just want to setup a timer based on the value I am getting back from the UIDatePicker...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用pickerView.countDownDuration,它返回一个NSTimeInterval(双精度)。
Use
pickerView.countDownDuration
, which returns an NSTimeInterval (a double).