UIColor colorWithPatternImage not tiling properly on non-retina iPad
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]](http://karlbecker.com/images/background_tiled_device.jpg)
The correct, continuous look in the iPad Simulator:
![[Image: background_tiled_sim.jpg]](http://karlbecker.com/images/background_tiled_sim.jpg)
The pattern image file itself (a 128x128 png):
[attachment=6]
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.
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]](http://karlbecker.com/images/background_tiled_device.jpg)
The correct, continuous look in the iPad Simulator:
![[Image: background_tiled_sim.jpg]](http://karlbecker.com/images/background_tiled_sim.jpg)
The pattern image file itself (a 128x128 png):
[attachment=6]
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.
KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
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.
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.
KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
Good call - and thanks for the link!
I've filed it under rdar://13251019
I've filed it under rdar://13251019
KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| All of the sudden my device is not provisioned properly | Nosredna | 12 | 4,410 |
Apr 21, 2009 10:11 PM Last Post: kodex |
|

