xcode 多了一个 ARC 的新编译器特性,挺神奇的,在使用模板创建一个项目的时候会自动启用这个特性( -fobjc-arc)

可以在 Build Setting => "Apple LLVM compiler 3.0-Auto Reference Counting“ => "Mugrate cide from MRR to ARC" 设置为 "MIGRATE code to ARC after building with PRECHECK" 这个就可以跳过烦人的预语法检查报错, 且自动转换成ARC。

禁用可以设置 Build Setting => "Apple LLVM compiler 3.0-Code Generation“ => “Objective-C automatic Reference Counting" 置为NO。

还可以设置 "Build Phases" => "Compile Sources" 中在禁用的源文件上加编译参数: -fno-objc-arc 。

posted on 2011-09-05 23:54  圣斗士  阅读(3499)  评论(0编辑  收藏  举报