Tutorial: Beginners Objective-C Understand The Self Keyword And Properties

Objective-C has many nuances that can take some time to grasp that can be difficult to understand, as they are rarely seen in other languages.

Some of these nuances involve the self keyword.  When first starting out it may be difficult to figure out exactly where to use it.  Another nuance involves the “dot syntax” for properties that was added in Objective-C 2.0, and when programmers switch between this and the pre-2.0 syntax it can get very confusing.

Keith Harrison has created a very good tutorial explaining many of the confusing situations that can arise involving the self keyword, and properties and Objective-C 2.0.

You can find the tutorial on his blog here:
Understanding Your (Objective-C) Self

A very good read if you are starting out, and getting confused.

[via @rwenderlich]

©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

DeliciousTwitterTechnoratiFacebookLinkedInEmail

Leave a Reply

Your email address will not be published. Required fields are marked *