Hi ! Need to override property setter of the parent class. In order to temporary block assignment. For example - selectedRange property of the UITextView. How can I do this ? Thanks.
+4
A:
-(void)setFoo:(Foo *)newFoo {
// Do something.
[super setFoo: newFoo];
}
If you want to block the setter sometimes,
-(void)setFoo:(Foo *)newFoo {
if (someCondition) {
[super setFoo: newFoo];
}
}
Frank Shearar
2010-04-22 15:39:40
Note: doing this on Apple-provided APIs can, in some cases, cause your application to be denied from the store.
rpetrich
2010-04-22 19:31:51