1

I have a class MyImage, that have a NSAffineTransform member transform.

In my AppDelegate a have a NSMutableArray of images.

I have a MyView that draw the images from AppDelegate.images. So it must track changes in AppDelegate.images and redraw the content.

What is the best way to implement this though bindings?

Dmitry
  • 7,300
  • 6
  • 32
  • 55

1 Answers1

0

You don't mean bindings, or if you do you have misunderstood how bindings work and what they are for.

For an explanation read this post - Manual binding in Cocoa

You need to use KVO to observe the array of images. You need to make sure you add and remove images from the array in a KVC compliant way.

Community
  • 1
  • 1
hooleyhoop
  • 9,128
  • 5
  • 37
  • 58