Objective-C quick reminders

Just a couple of things to keep in mind when doing Objective-C development:


Properties vs Members



  • Members are accessed through the self-> indirection 
  • Properties are accessed through self. or [self prop] or [self getProp]
Properties and members often share the same name, and by default, the member gets priority, so when a property tagged with the retain attribute doesn't retain, chances are that you are assigning a value directly on the member when you should be working with the property.


No comments:

Post a Comment

Please leave your comments in English or French and I will be pleased to answer them if you have any questions.

Spammers will be walked down the plank matey. Arrr!