is it possible to combine non-ARC and ARC project code?

后端 未结 1 492
情话喂你
情话喂你 2020-12-20 17:38

Is it possible to combine ARC and non-ARC projects? I haven\'t really tried it yet but this is the scenario:

We have an old iOS project (non-ARC) with a tab controll

相关标签:
1条回答
  • 2020-12-20 17:50

    Yes of course and it is very easy. Start your new project with arc and just "tag" the old imported .m files with the not arc thingy. Follow this tutorial to see how:

    http://www.raywenderlich.com/5677/beginning-arc-in-ios-5-part-1

    (explains about how to convert but also about how to maintain in a non arc fashion)

    Edit: The non arc tag is -fno-objc-arc you should set the files that you want xcode to consider non arc like this:

    enter image description here

    (taken from Ray Wenderlich tutorial page)

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