Theocacao
Leopard
Design Element
Comment on "New Objective-C Tutorial"
by Steven Degutis — Apr 14
Mike F.

The instance variables are in fact protected, but this simply means that they are private to all external sources, but subclasses may access them.

For example, if I create a class Car that has an instance variable of type NSString called "model" then my subclass Lexus may access the "model" variable in its superclass Car, but any instance in the class GasStation cannot access that variable without using an accessor (getter).
Back to "New Objective-C Tutorial"
Design Element

Copyright © Scott Stevenson 2004-2015