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

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

      • <bdo id='JHOjb'></bdo><ul id='JHOjb'></ul>
        <legend id='JHOjb'><style id='JHOjb'><dir id='JHOjb'><q id='JHOjb'></q></dir></style></legend>
      1. 带有大图像的Objective C iPad动画-使用什么方法?

        Objective C iPad Animation with large images - What method to use?(带有大图像的Objective C iPad动画-使用什么方法?)

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

          <tfoot id='Uj3Yv'></tfoot>

          • <bdo id='Uj3Yv'></bdo><ul id='Uj3Yv'></ul>

              • <legend id='Uj3Yv'><style id='Uj3Yv'><dir id='Uj3Yv'><q id='Uj3Yv'></q></dir></style></legend>
              • <small id='Uj3Yv'></small><noframes id='Uj3Yv'>

                  本文介绍了带有大图像的Objective C iPad动画-使用什么方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试在 iPad 上构建一个天气应用程序,但我似乎需要一些动画方面的帮助.假设我正在为雷达制作动画,因此雷达源文件有 10 张 900x700 像素大小的 gif/jpeg 图片.我已经使用这里的教程尝试了 UIImage 动画技术:

                  I'm trying to build a weather application on the iPad but it seems that I need some help in animation. Say I'm animating a Radar, so the radar source files have 10 gif/jpeg pictures in 900x700 pixel size. I've tried the UIImage animation technique using the tutorial here:

                  http://www.icodeblog.com/2009/07/24/iphone-programming-tutorial-animating-a-game-sprite/

                  但似乎加载 10 张这么大的图像对于 iPad 来说太多了,并且由于内存警告而崩溃.我正在研究其他动画技术,但我似乎找不到能有效地做到这一点的方法.

                  but it seems that loading 10 images that big is too much for the iPad to handle and its crashing due to memory warnings. I'm researching other techniques to animate but I can't seem to find something that will do this efficiently.

                  我看过其他人,例如使用 sprites 的 Core Animation,以及使用 sprites 的 Cocos2D.有人能指出正确的方向来制作这些大图像的动画吗?(请记住,这些图像是动态的并且经常变化,因此必须在服务器上重新创建精灵并从 iPad 中获取来制作动画).谢谢

                  I've looked at others like Core Animation using sprites, and Cocos2D with sprites. Can someone point in the right direction the best way to animate these big images? (keep in mind that these images are dynamic and changes often so the sprites will have to be recreated on a server and fetched from the iPad to do the animation). Thanks

                  推荐答案

                  OpenGL 仅创建尺寸为 2 次方的纹理.对于您的图像,即 1024x1024,即每个图像的内存量.不过,这应该不是 iPad 的问题.

                  OpenGL only creates textures with dimensions at powers of 2. In the case of your images, that's 1024x1024, which is a meg of memory per image. Still, that shouldn't be a problem with the iPad.

                  首先,使用 Xcode 的分析工具进行调查,以确保图像不会在动画的每个循环中重复加载到内存中(可能是通过不共享缓存纹理的新对象).这可以从一开始就解决您的问题.

                  First, investigate using Xcode's profiling tools to ensure the images aren't being repeatedly loaded into memory at each loop of the animation (likely by way of new objects that aren't sharing cached textures). That could solve your problem from the start.

                  其次,我推荐使用 Cocos2D,如果只是为了轻松处理纹理和缓存.将图像放入 CCAnimation 中,将其弹出到 CCRepeatForever 中,使用 CCSequence 运行它.完成后点击 CCTextureCache 释放未使用的纹理.

                  Second, I recommend using Cocos2D if only for the easy handling of textures and caching. Toss the images into a CCAnimation, pop that into a CCRepeatForever, run it with a CCSequence. When you're done hit CCTextureCache to release unused textures.

                  第三,将您的动画帧速率降低到 30 或更低(如果仅针对此动画).它可能是 iPad,但你正在制作一个天气应用程序.不是电子游戏.

                  Third, lower your animation framerate to 30 or less (if only for this animation). It may be the iPad, but you making a weather app. Not a video game.

                  最后,降低图片的大小.证明你想要的一切,但大型雷达动画不会卖掉你的应用程序.并且仅仅因为一个网站可能已经很好地播放了该动画,请记住桌面比任何智能手机都具有更多的内存和功能.

                  Finally, downgrade the size of your image. Justify all you want, but a large radar animation will not sell your app. And just because a website might already be playing that animation beautifully, remember that a desktop has vastly more memory and power than any smart phone.

                  这篇关于带有大图像的Objective C iPad动画-使用什么方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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='GzHrC'></tbody>
                  1. <small id='GzHrC'></small><noframes id='GzHrC'>

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

                        <tfoot id='GzHrC'></tfoot><legend id='GzHrC'><style id='GzHrC'><dir id='GzHrC'><q id='GzHrC'></q></dir></style></legend>