How would I get notified of a value of a NSDatePicker, when it's changed?
+1
A:
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.
I should clarify, this tells you when it changed, you still need to call -dateValue
to get the date.
bmalicoat
2009-12-10 05:38:00
Thanks so much!
nanochrome
2009-12-10 05:41:25
A:
You can bind the picker's value
binding to a property of your controller, or a property of a model object (through a controller).
Peter Hosey
2009-12-10 08:58:46
+2
A:
The same you would any other control. Options are:
- Target/Action
- Binding
- Observe notification
- Delegate
Mike Abdullah
2009-12-10 11:44:35