Default property attribute in iOS

333 Views Asked by At

I have below mentioned property in my interface file

@property NSString *stringObject;
@property NSMutableString *anotherStringObject;
@property NSArray *array;
@property NSMutableArray *anotherarray;
@property NSNumber *number;
@property NSDictionary *dictionary;
@property NSMutableDictionary *anotherDictionary;

@property NSInteger myInteger;
@property int intValue;
@property BOOL boolValue;
@property CGFloat floatValue;

As i have not explicitly mentioned any attribute here, So i want to know what are the default attributes added by the compiler in this code.

Note : i have already read apple guide for this , only information i get there is by default it is atomic and strong. I want to know what other attributes added along with them.

1

There are 1 best solutions below

1
On

If you don't mention you desired attributes ,then it will be :

For objects (NSObject , NSNumber , etc...) ==> readwrite/atomic/strong For scalars (NSIneger , BOOL , etc..)==> readwrite/atomic/assign