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

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
主站蜘蛛池模板: 河东区| 芦山县| 滦南县| 嘉祥县| 烟台市| 邳州市| 嫩江县| 博野县| 额尔古纳市| 塔河县| 白朗县| 宜州市| 嘉善县| 保康县| 蒲城县| 穆棱市| 新宁县| 姜堰市| 师宗县| 蚌埠市| 黄骅市| 青龙| 民权县| 安阳县| 思南县| 仪陇县| 济阳县| 龙海市| 蒙城县| 崇信县| 潍坊市| 沿河| 宜昌市| 朝阳县| 宕昌县| 沙湾县| 喀喇沁旗| 余庆县| 军事| 烟台市| 惠水县|