objective c - Is overriding a synthesize property in Objectice-C Ok or bad? -
I have overridden a synthesized property because I wanted to add an NSAssert.
Is it OK (ie override) or bad behavior?
@ modify some fields; - (NSString *) Some fields {NSAssert (someField! = Zero, @ "some fields"); Make some comeback; }
thanks
It is alright:
You use the @Synitish keyword to tell the compiler, which should synthesize Setter and / or Gestator methods for the property if you do not provide them within @Efmentation Block. / P>
So if you provide them, the compiler will use you, even if @ synthesis directive.
Comments
Post a Comment