objective c - Observe property of a custom view from Window Controller in Cocoa KVO -
this hierarchy of application, need observe property:
objecta | |-----windowcontrollera (nswindowcontroller) | |-------content(nswindow) | |--------contentview (custom nsview) | |---- propertyx (property observe)
i try observe objecta code: [self.windowcontrollera addobserver:self forkeypath:@"self.content.contentview.property" options:nskeyvalueobservingoptionold context:@"context"];
but doesn't work, error : was sent object not kvc-compliant "content" property.
what have observe propertyx objecta ?
i found problem! this's right path "window.contentview.property"
Comments
Post a Comment