2012-03-20 35 views
0

我使用弧创建了一个项目。 我使用了一些示例代码进行编译,它报道了很多ARC限制错误的在创建的项目中禁止弧线

是否有可能以后禁止弧?

欢迎任何评论

回答

7

的Xcode - 禁用ARC项目层面:

- Select your project file. 
- You should be in the “Build settings” tab.Select the “levels” option (default is “Combined”) 
- There’s a search  field to the right of “Combined”.Enter “Automatic” 
- Second group should be “Apple LLVM Compiler 3.0 – Language”. 
    Second line under that controls ARC. 
- Click that line, then in the middle column (where it says “yes”), 
    click and choose “no”. 

禁用ARC单个文件:

它可以禁用ARC单个文件通过为这些文件添加-fno-objc-arc编译器标志。

您在Targets -> Build Phases -> Compile Sources添加编译器标志。您必须双击Compiler Flags下的右列。您也可以在按住CMD按钮选择文件,然后按下回车弹出标志的文本框中添加多个文件。

+0

正确答案先生尼西谢谢你,我也有这个问题 – Ramz 2012-06-04 10:00:11