ios5 ARC what is the compiler flag to exclude a file from ARC?(ios5 ARC 什么是从 ARC 中排除文件的编译器标志?)
问题描述
谁能帮我记住告诉 XCode 对某些文件不使用 ARC 的标志是什么?我的项目中有几个文件被标记为这样...直到我添加了另一个文件并决定将其转换为 ARC.听起来很容易,对吧?我希望我能够简单地检查我想要的文件并让 XCode 发挥它的魔力.好吧,不是那么容易,在预检查期间它从文件中删除了所有 -Noarc 标志,现在我需要手动将标志重新应用于多个文件.
Can anyone help me remember what was the flag to tell the XCode to not use ARC for some file? I had several files in my project marked as such... Until I added another file and decided to convert that one to ARC. Sounds easy, right? I expected that I would be able to simply check a file that I want and let the XCode do it's magic. Well, not so easy, during pre-check it stripped all -Noarc flags from the files and now I need to manually re- apply the flag to several files.
这个故事的寓意是:一旦您的项目在 ARC 中并且您有一些文件标记为无 ARC,请不要从 Refactor>Convert to ARC 重新运行转换为 ARC 工具.即使预检查失败,它也不会恢复您的设置.
the moral of this story is: once your project is in ARC and you have some files marked as no ARC, do not re-run the convert to ARC tool from Refactor>Convert to ARC. It will not restore your settings even if pre-check fails.
推荐答案
我找到了答案:要从 ARC 中排除文件,请在构建阶段使用 -fno-objc-arc 标志>compile来源
I found the answer: to exclude the file from ARC, use the -fno-objc-arc flag in build phases>compile sources
这篇关于ios5 ARC 什么是从 ARC 中排除文件的编译器标志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:ios5 ARC 什么是从 ARC 中排除文件的编译器标志?
基础教程推荐
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
