I had a property named myName
in my class, like:
@property (nonatomic, strong) NSString *myName;
I need to send a notification whe
To do this without the customer setter, just synthesize the property setter. This will create all the supporting calls to willChangeValueForKey / didChangeValueForKey.
@synthesize myName;
Then set property values with dot-syntax:
self.myName = @"Inigo Montoya"
Then the observers will receive the KVO notification automatically.
(You will need to remove the observer before you release the observed object.)