ARC专题:在Xcode 4.2中加入不支持ARC的源码

http://blog.sina.com.cn/s/blog_4c4c79950100tii5.html

ARCAutomatic ReferenceCounting的意思;non-ARC,即Manual Reference Counting。)


  1. 添加non-ARC源代码文件到ARC的工程,例如xxx.hxxx.m

  2. 选择ARC工程的target,打开Build Phases->CompileSources, 选中xxx.m,添加编译选项-fno-objc-arc

  3. 再展开Link Binary WithLibaries,添加QuartzCore.framework


备注,在支持ARC的工程中,添加一些non-ARC的开源代码,如AQGridView时,需要使用到此技巧。



原文地址:https://www.cnblogs.com/javawebsoa/p/2458443.html