jos*_*ine 7 xcode refactoring objective-c automatic-ref-counting
在XCode 4.3.2中,当我运行ARC转换重构工具时,所有"保留"的属性选项都不会被更改为"强".现在暗示"强烈"还是仅仅是XCode 4.3.2的问题?
例:
之前
@property (nonatomic, retain) NSString * someString;
Run Code Online (Sandbox Code Playgroud)
后
@property (nonatomic) NSString * someString;
Run Code Online (Sandbox Code Playgroud)
小智 1
使用 ARC (LLVM 3.1) 时,“strong”是默认值,因此新代码是正确的。
(在 ARC 之前,默认值为“分配”)
请参阅http://clang.llvm.org/docs/AutomaticReferenceCounting.html#ownership.spelling.property
| 归档时间: |
|
| 查看次数: |
510 次 |
| 最近记录: |