iDevGames Forums

Full Version: UIColor colorWithPatternImage not tiling properly on non-retina iPad
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've got a pattern image (file attached) that is not tiling properly on non-retina screens.

However, it's 128x128, and from what I can tell looks good.

I have attached two images showing how it tiles - one has horizontal black lines running through it. This is what it looks like on an iPad 1 and 2, which is definitely wrong.
I've also attached an image showing what it looks like in the non-retina iPad Simulator - it's nice and continuous, no black lines.

The incorrect, black-line-added look on an iPad 1 and 2:
[Image: background_tiled_device.jpg]

The correct, continuous look in the iPad Simulator:
[Image: background_tiled_sim.jpg]

The pattern image file itself (a 128x128 png):

Any idea why that black line is appearing?

There must be something in the file that's being interpreted by the non-retina iPad funny.
It does not do this on iPad 3 and 4 since I have a different sized png file, and I guess that's causing no problems.
How about I answer my own question...

Tried re-saving the attached pattern image as a 32-bit png file, and everything started working.

So... good thing to note if you're ever using an image as a pattern in iOS: use a 32-bit png file. This is my standard practice, but I was supplied this image file by my designer, so I didn't save it from source as a 32-bit png.
You may want to file a bug report:
Good call - and thanks for the link!

I've filed it under rdar://13251019
Reference URL's