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?
Tiled Background Images A tiled background image is a small size image that is designed so that it can repeat seamlessly both horizontally and vertically.
Description. The background-repeat property controls whether or not a background-image is repeated (tiled), and if it is repeated, the property defines along which of the specified axes (x, y, or both) the image is to be repeated.
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.
To get alpha to work with pattern image, make sure you have the following set:
view.backgroundColor = [UIColor colorWithPatternImage:aImage]; view.layer.opaque = NO;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With