NSDatePicker - getting value when changing it

How do I get notified of an NSDatePicker value when it changes?

+3
source share
3 answers

I just did it on an iPhone with UIDatePicker, but it looks like a Mac, you register as a delegate and receive messages. See Apple Docs here .

I have to clarify, this tells you when it has changed, you still need to call -dateValueto get the date.

+4
source

The same would be with any other control. Possible options:

  • Target / Action
  • Snap
  • Observe notice
  • delegate
+3
source

picker value ( ).

+1
source

Source: https://habr.com/ru/post/1725247/


All Articles