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

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
主站蜘蛛池模板: 和平区| 河间市| 平果县| 鹤岗市| 柳河县| 连州市| 西乌珠穆沁旗| 锡林浩特市| 昆山市| 西畴县| 通榆县| 溆浦县| 萨嘎县| 营口市| 宜城市| 台东市| 永新县| 龙江县| 佛山市| 华宁县| 类乌齐县| 察雅县| 英吉沙县| 旅游| 邳州市| 郎溪县| 南乐县| 开封县| 阿拉善盟| 溧阳市| 博野县| 偏关县| 洱源县| 荆州市| 彭泽县| 永城市| 沈阳市| 江安县| 休宁县| 武清区| 德钦县|