You can declare a variable like this.
Case1:
@interface MyClass : NSObject
{
NSString *str;
}
@end
Also, if you want to set its property, you can do
Case2:
@interface MyClass : NSObject
{
NSString *str;
}
@property (nonatomic, strong) NSString *str;
@end
And in the .m,
@synthesize str;
My understanding with the difference between Case 1 and Case 2 is that synthesized and propertied variables in Case 2 can be accessed from another class when this another class instantiates this class.
What are other differences between Case 1 and 2? Say when these variables are just used only in its .m file. The fact that you are setting 'str' properties probably makes a difference, but how? If you don't set property, how are they going to be released with ARC?