在ios中的特定类中使用自动引用计数 [英] Use Automatic Referencing Count in specific classes in ios
问题描述
实际上,当我试图在IOS 5之前添加一些在ios上制作的类并且这些类没有ARC并且我想要添加的项目是在IOS 5和它给了我与ARC相关的编译时错误,这些类有吮吸的信息,如果我试图删除释放/保留然后它开始表现不规则。这是我的问题,现在来问题我想知道那里有任何方式,以便我可以标记这些类不使用ARC,以便新创建的具有基本SDK ios5的类使用ARC编译,并且我提到不使用ARC只是使用它们的保留/释放值编译。这是我离开的唯一方法我认为正确地制作这个应用程序。
Actually i came to this question when i was trying to add some classes that have been made upon ios prior to IOS 5 and these classes doesn't having ARC and the project i am trying to add is made upon the IOS 5 and it give me the compile time error related to ARC the classes having suck kind of information that if i try to remove the release/retain then it start behaving irregular.That is my problem, Now come to question i want to know that is there any way so that i can mark those classes not to use ARC so that the newly created classes that having base SDK ios5 compile with ARC and i mention not to use ARC simply compiled with their retain/release values.That is the only way i have left i think for making properly this app.
我知道如何在ios5之前使用那些具有基本sdk的类。
Any idea how i can use those classes that is having base sdk prior to ios5.
谢谢,
推荐答案
下图将向您展示如何操作。
the image below will show you how to do it.
-fno-objc-arc flag to disbale arc
-fobjc-arc flag to enable arc
< img src =https://i.stack.imgur.com/MSlC0.pngalt =在此处输入图像说明>
这篇关于在ios中的特定类中使用自动引用计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!