Getsy
Getsy

Reputation: 4905

iPhone: Default compiler directive in Objective C

If this question is repeated, please ignore it. but i couldn't find it repeated. In objective C, the default compiler directive is @protected not @public for class instance variables, is that right? Please correct me if i'm wrong.

Thank you.

Upvotes: 0

Views: 67

Answers (2)

Jonathon Reinhart
Jonathon Reinhart

Reputation: 137547

[By] default, instance variables are visible in all instance methods of a class and its subclasses. This is referred to as @protected scope in Objective-C.

Upvotes: 1

Bijoy Thangaraj
Bijoy Thangaraj

Reputation: 5546

All instance variables without an explicit scope directive have @protected scope

Upvotes: 0

Related Questions