Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)setText:(NSString *)text
- {
- static NSString *key;
- if (!key) key = NSStringFromSelector(@selector(text));
- [self willChangeValueForKey:key];
- [self setPrimitiveText:text];
- self.textCount = text.count;
- [self didChangeValueForKey:key];
- }
- [someObject addObserver:self forKeyPath:NSStringFromSelector(@selector(text)) options:NSKeyValueObservingOptionNew context:someContext];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement