• <bdo id='7Thgj'></bdo><ul id='7Thgj'></ul>

      <small id='7Thgj'></small><noframes id='7Thgj'>

      <tfoot id='7Thgj'></tfoot>
      <legend id='7Thgj'><style id='7Thgj'><dir id='7Thgj'><q id='7Thgj'></q></dir></style></legend>
    1. <i id='7Thgj'><tr id='7Thgj'><dt id='7Thgj'><q id='7Thgj'><span id='7Thgj'><b id='7Thgj'><form id='7Thgj'><ins id='7Thgj'></ins><ul id='7Thgj'></ul><sub id='7Thgj'></sub></form><legend id='7Thgj'></legend><bdo id='7Thgj'><pre id='7Thgj'><center id='7Thgj'></center></pre></bdo></b><th id='7Thgj'></th></span></q></dt></tr></i><div id='7Thgj'><tfoot id='7Thgj'></tfoot><dl id='7Thgj'><fieldset id='7Thgj'></fieldset></dl></div>

      cocos2d 支持 ARC 吗?

      时间:2024-04-14
      <tfoot id='Uxo4l'></tfoot>
    2. <i id='Uxo4l'><tr id='Uxo4l'><dt id='Uxo4l'><q id='Uxo4l'><span id='Uxo4l'><b id='Uxo4l'><form id='Uxo4l'><ins id='Uxo4l'></ins><ul id='Uxo4l'></ul><sub id='Uxo4l'></sub></form><legend id='Uxo4l'></legend><bdo id='Uxo4l'><pre id='Uxo4l'><center id='Uxo4l'></center></pre></bdo></b><th id='Uxo4l'></th></span></q></dt></tr></i><div id='Uxo4l'><tfoot id='Uxo4l'></tfoot><dl id='Uxo4l'><fieldset id='Uxo4l'></fieldset></dl></div>

            <bdo id='Uxo4l'></bdo><ul id='Uxo4l'></ul>
            <legend id='Uxo4l'><style id='Uxo4l'><dir id='Uxo4l'><q id='Uxo4l'></q></dir></style></legend>

            <small id='Uxo4l'></small><noframes id='Uxo4l'>

                  <tbody id='Uxo4l'></tbody>
                本文介绍了cocos2d 支持 ARC 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在使用 Xcode 4.2 并为 iphone(从 iOS 3.0 - 5.0)构建游戏.cocos2d 支持 ARC 吗?转换以前版本写的代码需要做哪些修改?

                I am using Xcode 4.2 and building a game for iphone (from iOS 3.0 - 5.0). Does cocos2d support ARC? What modifications needs to be made to convert code written in previous versions?

                如果我对变量使用强弱关键字并将编译器设置为 LLVM GCC 4.2,结果会是什么?是否有必要将编译器更改为 3.0 以支持 ARC?

                If I use the strong and weak keywords for variables and set compiler to LLVM GCC 4.2, what will be the results? Is it a necessity to change compiler to 3.0 to support ARC?

                推荐答案

                Cocos2d v1.1和v2.0兼容ARC.但是,cocos2d 代码本身不使用 ARC,并且 cocos2d 没有提供可用于开始使用 ARC 编程的模板.您需要自己为 cocos2d 文件添加单独的静态库目标.

                Cocos2d v1.1 and v2.0 are compatible with ARC. However, the cocos2d code itself does not use ARC and there are no templates provided by cocos2d that you can use to start programming with ARC. You are required to add a seperate static library target for the cocos2d files yourself.

                正如 Ankit 所指出的,Tiny Tim Games 对 cocos2d-iphone 的分叉版本进行了必要的更改 使其与 ARC 兼容.这些更改已集成到开发版本中,应该在 cocos2d v2.x 分支中可用.我已经写了一个 教程在 cocos2d 中启用 ARC(2.0) 项目.

                As Ankit pointed out, Tiny Tim Games made the necessary changes to a forked version of cocos2d-iphone to make it ARC compatible. These changes have been integrated into the development version and should be available in the cocos2d v2.x branch. I've since written a tutorial to enable ARC in a cocos2d (2.0) project.

                据说在v2.1或者v2.2内部,cocos2d本身会被转换为使用ARC.

                It was said that cocos2d itself will be converted to use ARC internally in v2.1 or v2.2.

                需要注意的是,没有计划在 cocos2d v1.x 分支中正式支持 ARC,因为 v1.x 线应该保持向后兼容第一代设备和 iOS 3.x.但一般 ARC 兼容性已添加到 v1.1.

                It's important to note that there are no plans to officially support ARC in the cocos2d v1.x branch because the v1.x line is supposed to remain backwards compatible with 1st generation devices and iOS 3.x. But general ARC compatibility has been added to v1.1.

                Kobold2D 完全支持 ARC 并在所有 15 个模板项目中为 www.learn-cocos2d.com/2011/10/kobold2d-preview-6-giving-retain-release-autorelease-finger/">现在快两个月了.Kobold2D 使用 cocos2d-iphone 1.x 和 2.x 的最新稳定版本.只需启动一个新的 Kobold2D 项目,您就可以使用 cocos2d 和 ARC.

                Kobold2D fully supports ARC and has it enabled in all 15 template projects for almost two months now. Kobold2D uses the latest stable versions of cocos2d-iphone 1.x and 2.x. Just start a new Kobold2D project and you're set to work with cocos2d and ARC.

                这篇关于cocos2d 支持 ARC 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:“语义错误:使用不同类型重新定义 '__ccContentScaleFactor'"在 Coc 下一篇:iOS 6 - 如何在方向改变时运行自定义代码

                相关文章

              1. <tfoot id='3QteD'></tfoot>

                  <legend id='3QteD'><style id='3QteD'><dir id='3QteD'><q id='3QteD'></q></dir></style></legend>
                1. <small id='3QteD'></small><noframes id='3QteD'>

                  1. <i id='3QteD'><tr id='3QteD'><dt id='3QteD'><q id='3QteD'><span id='3QteD'><b id='3QteD'><form id='3QteD'><ins id='3QteD'></ins><ul id='3QteD'></ul><sub id='3QteD'></sub></form><legend id='3QteD'></legend><bdo id='3QteD'><pre id='3QteD'><center id='3QteD'></center></pre></bdo></b><th id='3QteD'></th></span></q></dt></tr></i><div id='3QteD'><tfoot id='3QteD'></tfoot><dl id='3QteD'><fieldset id='3QteD'></fieldset></dl></div>
                      <bdo id='3QteD'></bdo><ul id='3QteD'></ul>