I get how to use K-V-O
for simple property stuff. I have a model that looks like
@interface WateringScript : NSObject
@property (strong, nonatomic) NSMutableArray* spans; // holds WateringSpans
...
@end
@interface WateringSpan : NSObject
@property (strong, nonatomic) WateringAnchor* begin;
@property (strong, nonatomic) WateringAnchor* end;
...
@end
@interface WateringAnchor : NSObject
@property (assign, nonatomic) NSTimeInterval offset;
...
@end
Basically a top level object that holds a series of spans, the spans being defined as end and begin anchor objects, which amongst other things have an offset.
I have a custom view that would like to draw all of the offsets. Is there a simple way to observe all of the offsets? Such that as they change, or spans or added or removed, I can be notified of it and react accordingly?
Or do I have to observe the collection, and then on initial/add/remove changes observe and unobserve the collection elements? I think I could code this up if I have to, the real question is there KVO Juju that makes it easier?