How to enable ARC for a single file

后端 未结 2 410
半阙折子戏
半阙折子戏 2020-11-30 02:45

I want to bring a single Objective-C class written using ARC into an old project. The internet provides many references for how to enable ARC for your project and then disab

相关标签:
2条回答
  • 2020-11-30 03:19

    Add the -fobjc-arc flag to any files for which you'd like to enable ARC, as described in the ARC documentation.

    0 讨论(0)
  • 2020-11-30 03:33

    Select Target > Build Phases > Compile Source > Select Your class > Double Click> Type

    -fobjc-arc in dialog box

    Enter.

    0 讨论(0)
提交回复
热议问题