How do I Create an Instance Variable in Objective-C?
Instance Variable in Objective-C:
An instance variable is a pieces of information specific to an individual instance of a class.
Create an Instance Variable in Objective-C:
In Objective-C, instance variables are easily created by using @property
. An @property is an instance variable with a few bonus features attached. It is sort of a container that holds a piece of information. A property always belongs to a class, or rather to an instance of the class.
Example:
@property (nonatomic, assign) BOOL someBool;