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 中排除文件的编译器标志?
基础教程推荐
- - (CGRect)convertRect:(CGRect)rect toView:(UIView *)view 如何工作 2022-01-01
- 在 appComponent dagger 2 中动态添加测试模块? 2022-01-01
- 如何将多个组件添加到 PickerView? 2022-01-01
- 突出显示朗读文本(在 iPhone 的故事书类型应用程序中) 2022-01-01
- 可可/目标C(OSX不是iOS)从子对象访问父对象 2022-01-01
- 新的@SystemApi 注解是什么意思,和@hide 有什么区别 2022-01-01
- 在 Android 模拟器中激活网络位置提供程序? 2022-01-01
- 在 iOS8 中无法获得正确的键盘高度值 2022-01-01
- Android:STATE_SELECTED不工作 2022-01-01
- 我的 UIImageView 的任务 2022-01-01
