Guest User

Untitled

a guest
Jul 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. The sixth property
  2. @property (nonatomic, copy) NSString* disability
  3. has a synthesis directive as @synthesize disability=_disability. It will be synthesized exactly as we saw the synthesis of the first property, except that we tell the compiler to associate the disability property with the _disability instance variable.
  4. A possible synthesis of this property is as follows:
  5. -(NSString*) disability{ return _disability;
  6. }
  7. -(void) setDisability:(NSString*)newDisability{ if(_disability != newDisability){
  8. [_disability release];
  9. _disability = [newDisability copy]; }
  10. }
Add Comment
Please, Sign In to add comment