- 當(dāng)Build Settings -> Objective-C Automatic Reference Counting 設(shè)置為NO時(shí),表示全局不使用自動(dòng)引用技術(shù)。如果有些類(lèi)需要使用自動(dòng)引用技術(shù)則添加如下配置。
-fobjc-arc (Build Phases->CompileSources->CompilerFlags)
- 當(dāng)Build Settings -> Objective-C Automatic Reference Counting 設(shè)置為YES時(shí),表示全局使用自動(dòng)引用技術(shù)。如果有些類(lèi)手動(dòng)管理引用的則添加如下配置。
-fno-objc-arc