English 中文(简体)
PNGs and UIImage Optimisation
原标题:

Is it better to have a PNG, say 320px x 44px and display it once, or to have a PNG that is 320px x 4px and use [UIColor colorWithPatternImage:]?

I know that the iPhone handles PNGs well and decompresses them, so in terms of memory, would it be best to use the smallest possible images, and in this case, use the UIColor method to repeat it?

Are there any drawbacks to using colorWithPatternImage? Perhaps over larger areas, maybe half a screen size or full screen sized?

Many thanks,

Michael

最佳回答

I m willing to bet that choosing one over the other won t make a noticeable difference in your app s responsiveness. The only place people might notice a difference is if they re downloading your app over EDGE, in which case the tiled image is the way to go.

I would do whatever makes your app most maintainable.

问题回答

The answer depends on what "better" means to you. If you re more concerned about the size of the app, then smaller pictures would help you. If the application s speed is more of an issue than size, then a larger image will eliminate the need for all the colorWithPatternImage calls and effectively run faster.





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签