Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can you write setter method for a retain property?



Can you write setter method for a retain property?..

Answer / Jitendra C Kanaujia

Yes, you can write a setter method for a retain property. In Objective-C, it would look something like this: - (void)setProperty:(id)newValue { if (newValue != self.property) { [self willChangeValueForKey:@"property"]; self.property = newValue; [self didChangeValueForKey:@"property"]; } }

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

What is polymorphism in objective-c?

1 Answers  


What is responder chain?

1 Answers  


How to call methods in objective c?

1 Answers  


What is super in objective c?

1 Answers  


What is the difference between typedef and enum?

1 Answers  


What does alloc mean in objective c?

1 Answers  


What is typedef objective c?

1 Answers  


Distinguish between @synthesize and @dynamic in objective –c?

1 Answers  


What is assign property in objective c?

1 Answers  


What is hashable?

1 Answers  


What is lazy var?

1 Answers  


Explain what is @synthesize in objective-c?

1 Answers  


Categories