How do I override a property?

You must override the set of properties of the parent class. For temporary block assignment. For example - Range UITextView property is selected. How can i do this? Thanks.

+2


a source to share


1 answer


-(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];
  }
}

      

+5


a source







All Articles