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

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

      如何在 UIView 上添加 CCSprite

      How to add CCSprite over UIView(如何在 UIView 上添加 CCSprite)
    1. <legend id='Nirt9'><style id='Nirt9'><dir id='Nirt9'><q id='Nirt9'></q></dir></style></legend>

        <bdo id='Nirt9'></bdo><ul id='Nirt9'></ul>

      • <tfoot id='Nirt9'></tfoot>
          <tbody id='Nirt9'></tbody>
        <i id='Nirt9'><tr id='Nirt9'><dt id='Nirt9'><q id='Nirt9'><span id='Nirt9'><b id='Nirt9'><form id='Nirt9'><ins id='Nirt9'></ins><ul id='Nirt9'></ul><sub id='Nirt9'></sub></form><legend id='Nirt9'></legend><bdo id='Nirt9'><pre id='Nirt9'><center id='Nirt9'></center></pre></bdo></b><th id='Nirt9'></th></span></q></dt></tr></i><div id='Nirt9'><tfoot id='Nirt9'></tfoot><dl id='Nirt9'><fieldset id='Nirt9'></fieldset></dl></div>

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

              • 本文介绍了如何在 UIView 上添加 CCSprite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                In my cocos2d application, I have a UIView that I am displaying on my screen by adding a subview to [[CCDirector sharedDirector] openGLView], but I am wondering if there is someway to display a CCSprite above this view, since I have to do lots of interactions and animations with those CCObjects.

                Please help. Thanks in advance...

                解决方案

                Of course you can't add CCSprite on UIView. CCSprite is from Cocos2d library class and UIView is UIKit class. If you want add UIView over game view then you need to access rootviewcontroller view which is root of UIWindow. Its something like this,

                [appDelegate.yourRootViewController.view addSubview:yourview];
                

                Always keep remember Cocos2d library control are part of GLView.

                这篇关于如何在 UIView 上添加 CCSprite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                Resume game cocos2d(恢复游戏 cocos2d)
                Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                How to convert 32 bit PNG to RGB565?(如何将 32 位 PNG 转换为 RGB565?)
                  <tbody id='n6uf6'></tbody>

                    • <tfoot id='n6uf6'></tfoot>
                    • <small id='n6uf6'></small><noframes id='n6uf6'>

                          <bdo id='n6uf6'></bdo><ul id='n6uf6'></ul>

                          <legend id='n6uf6'><style id='n6uf6'><dir id='n6uf6'><q id='n6uf6'></q></dir></style></legend>

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