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

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -