如何为特定文件添加ARC? [英] How to add ARC for specific file?
问题描述
我创建了一个没有 ARC
的项目。我想在我的项目中使用第三方SDK 。 SDK
附带 ARC
支持。所以我想为第三方文件添加 ARC
。我可以通过将此标志添加到构建阶段(例如)来禁用所有
。MYProject
文件的 ARC
-fno-objc-arc
I created a project without ARC
. I want to use a third party SDK in my project. That SDK
comes with ARC
Support. So I want to add ARC
for that third party files. I can disable ARC
for all "MYProject"
files by adding this flag into build phases like -fno-objc-arc
.
但我可能会使用大量文件。因此,最好只为特定的 SDK
添加 ARC
。那么如何在 XCode
项目中为单个或特定 SDK
文件添加ARC支持?
But I may use large number of files. So it's better to add ARC
for specific SDK
only. So how to add ARC support for single or specific SDK
files in XCode
Project?
For Instance:我想使用网格视图。我在我的项目中添加 GMGridView
,它附带 ARC
支持。
For Instance: I want to use Grid View. I'm adding GMGridView
in my project and it comes with ARC
support.
推荐答案
将标志 -fobjc-arc
添加到您要使用ARC的文件中。它恰恰相反。
Add the flag -fobjc-arc
to the files that you'd like to use ARC. It's just the opposite of the other.
这篇关于如何为特定文件添加ARC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!