views:

1361

answers:

1

I have a fullscreen background image that is tiled, i.e. it has to be reproduced a few times horizontally and vertically in order to make a big one. Like in the browsers on ugly home pages ;)

Is UIImageView my friend for this?

+8  A: 

If I understand your question correctly you can use colorWithPatternImage: on UIColor then set the background color on a UIView.

If you must use a UIImageView you can do the same but whatever image you place in the image view will draw in front of the tiled image.

Bill Dudney
Thanks! Well what I want to do is: I have an image file with a pattern, that can be repeated vertically and horizontally. I want to repeat this image pattern on my screen. Maybe it saves some memory.
Thanks
If you use the UIColor method outlined you will get your screen filled with the pattern image. There are more complex ways but from your description this should work.
Bill Dudney
Hi, this works, but the Alpha of the Image doesn't work. :( Any solutions
Quakeboy