Hi,

I have a view with a subview. The subview is rotated by a drag operation, when 
I change the subview transform property.

Now I'm trying to set the view as observer of subview transform property, like 
this:

[subView addObserver:self forKeyPath:@"transform" 
options:NSKeyValueObservingOptionNew context:@"subViewRotation"];

And in the superview I added just this:

- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object 
change:(NSDictionary *)change context:(void *)context {
    NSLog(@"%@ - %@ - %@", keyPath, object, context);
}

But this code is never called.

I also tried

[subView addObserver:self forKeyPath:@"transform" 
options:NSKeyValueObservingOptionNew context:@"subViewRotation"];

which also didn't work.

What I'm doing wrong?

Is there a good reference about KVO? I have already read the KVO Quick start 
guide and Key-Value Observing Programming Guide, but maybe someone have a 
better reference.

Thank you

Tales
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to