官术网_书友最值得收藏!

Project settings for ARC

When a project is set to utilize ARC, the compiler flag -fobjc-arc is by default set for every Objective-C source file. ARC can be disabled for particular classes through the compiler flag, -fno-obj-arc. In Xcode, go to the target Build Phases tab, open the Compile Sources group, and you will be able to see the source file list. When you double-click on the file where you want to set it, a pop-up panel will appear. In that panel, get in the -fno-obj-arc flag and click on Done to finish.

If ARC was not enabled when the project was created, then to enable it, follow this process:

  1. Open the project.
  2. Go to Edit | Refactor | Convert to Objective-C ARC.
  3. If there is no problem and it's ready to convert, it will check your code.

By default, all newly created Objective-C projects in Xcode 5 are enabled with ARC. However, if you need to disable it, follow these steps:

  1. Select Project.
  2. Select Targets.
  3. From the right panel, go to Build Settings.
  4. Select Automatic Reference Counting.
  5. Select Apple LLVM compiler 3.0 – Language.
  6. Locate Objective-C++ Automatic Reference Counting and, in all three sections, select NO.
    Project settings for ARC
主站蜘蛛池模板: 武定县| 江安县| 牙克石市| 东乌珠穆沁旗| 新蔡县| 墨脱县| 深水埗区| 保定市| 苍梧县| 田林县| 新丰县| 奉新县| 利津县| 常山县| 微博| 安仁县| 宜昌市| 柏乡县| 施秉县| 阳泉市| 资阳市| 衢州市| 奉节县| 亳州市| 云阳县| 工布江达县| 南阳市| 赫章县| 金平| 多伦县| 仙居县| 建湖县| 郴州市| 东源县| 银川市| 泊头市| 邵东县| 柳江县| 南木林县| 商洛市| 玉树县|