Sam Stewart

Ramblings of a discombobulated programmer

5 notes &

Tiling UIImage

If you want your UIImage to repeat, you must wrap it as a “pattern” and assign it as the background color of a view. Additionally, ensure that you set the opaque on both the layer and the view if you have a semi-transparent image.

More info here:
http://stackoverflow.com/questions/4059487/iphone-uiviews-backgroundcolor-using-a-png-with-transparency 

Edit:
You must set the opaque properties after you set the background image. This is probably due to the rendering engine. 

Filed under iphone uiview uiimage interface ios

  1. samthestewart posted this