tags:

views:

50

answers:

2

All I think to know is, that it marks a property "public". And it creates setters and getters automatically. But when I don't have that, are my properties private?

What's the name of this "technology"? Why's there an @ in front of "property"?

A: 

My understanding is that the @ infront of property makes it a compiler directive. It tells the compiler to do things. In this case it creates tells the compiler how to create the getter and setter methods for the member variable. You could do this manually of course, but this is there so that the compiler can do it for you.

Xetius
+1  A: 

@property () type prop_name is just a signal to compiler to create two methods:

-(type) propName;

and

-(void) setPropName; // Not created for readonly properties

In objective-C all methods are public. Let is why all properties are public too

oxigen