I’ve read about properties and in every tutorial it looked like this:
@interface SomeClass : NSObject{
NSString* SomeString;
}
@property (strong, nonatomic) NSString* SomeString;
but everything works perfectly even when line NSString* String; is missed in a class parameters.
Why it should be written?
In objetive-c 2.0, the @property together with @synthesize command will create automatically instance variables for you (if you not have done so).
This is kind of a short cut.
When you remove
NSString* SomeString;from your “class parameters” (iVars) your application behavior won’t change because the compiler will automatically add the instance variable to your header file.Update 1: thanks to info of Jenox, i corrected my answer.