tags:

views:

107

answers:

2

Here's an example of the type of background image I'm talking about, the iPhone Notes app...

alt text

Clearly, there's a pattern in it. My question is, if this were an iPad app and the background image was twice the size, would there be any significant benefits to taking advantage of this pattern by tiling the image? Or would it really make no difference in terms of performance and just be easier to load the entire image into a UIImageView?

Thanks in advance for all your wisdom!

A: 

Even on iPhone, it's tiled. The UIColor class can also be used to create patterns with images. Take a look at the colorWithPatternImage class method.

Macmade
thanks, macmade! I have it figured out how to do it with the UIColor class, I was just wondering if it honestly makes a difference with all the power packed into the iPad or if I'm just adding unnecessary complexity to my app. your thoughts?
BeachRunnerJoe
The iPad only has a 60% higher clock speed for a screen that has 5x the number of pixels... keep that in mind.
rpetrich
The answer to "does it make a difference" is ideally profile it and find out. That said, yes, I would expect it to matter. Mostly it matters for memory usage, but often smaller == faster since caches work better. The iPad is 1024 * 768. If your image is 8 bit ARGB packed as tight as it can, that's at least 3MB. 3MB is non-trivial on these devices.
Ken
+1  A: 

Yes, Apple has stated before that if you can tile, you gain a lot - for one thing, you have a far smaller image in memory so right away you have a large memory win, but then also drawing performance will be faster too.

Kendall Helmstetter Gelner