Google News
logo
IOS - Interview Questions
Implement your own synthesized methods for the property NSString *title.
Well, you would want to implement the getter and setter for the title object. Something like this: view source print?
– (NSString*) title // Getter method
  {
    return title;
  }
– (void) setTitle: (NSString*) newTitle //Setter method
  {
    if (newTitle != title)
  {
    [title release];
    title = [newTitle retain]; // Or copy, depending on your needs.
   }
  }
Advertisement