本文介绍了NSDatePicker-更改时获取值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
更改NSDatePicker的值后如何通知我?
How would I get notified of a value of a NSDatePicker, when it's changed?
推荐答案
我仅在使用UIDatePicker的iPhone上完成了此操作,但在Mac上却类似,您注册为委托并接收消息.请参阅此处是Apple的文档.
I've only done it on the iPhone with UIDatePicker but it is similar on the Mac, you register as a delegate and receive messages. See Apple's Docs here.
我应该澄清一下,它告诉您更改的时间,您仍然需要调用-dateValue
来获取日期.
I should clarify, this tells you when it changed, you still need to call -dateValue
to get the date.
这篇关于NSDatePicker-更改时获取值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!