TodoChallenge- your solution


#1

In your TodoController,
why did you reference your variables by [ self propertyName] instead of just by the instance name ?

Is there some kind of problem this circumvents ?

Thanks,
Judy


#2

Judy,

It’s generally recommended to refer to properties/i-vars through the property, rather than the underlying instance variable. The reason is that this allows KVO mechanisms to work, or any other additional work you might be doing in a setter or getter. If you know that there’s nothing extra going on in those methods, or if KVO is not being used with them, then accessing the instance variables directly is fine. In the book we use instance variables directly for brevity.

Adam