Tiled Background Image: Can I do that easily with UIImageView?

Thanks picture Thanks · Jul 14, 2009 · Viewed 44.3k times · Source

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?

Answer

Bill Dudney picture Bill Dudney · Jul 14, 2009

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.