【发布时间】:2015-08-27 02:55:52
【问题描述】:
我的接口文件中有以下提到的属性
@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;
由于我在这里没有明确提到任何属性,所以我想知道编译器在这段代码中添加的默认属性是什么。
注意:我已经阅读了苹果指南,默认情况下只有我得到的信息是atomic 和strong。我想知道与它们一起添加的其他属性。
【问题讨论】:
-
默认/隐式值为 atomic、readwrite 和 assign。
-
为标量赋值,为对象赋值。
-
ARC 变强了
-
@SandeepAgrawal,不适用于标量。
-
@SandeepAgrawal,请参阅我的第一条评论。
标签: ios objective-c properties attributes