self.view.layer.contents = (id) [UIImage imageNamed: @ "background.png"]. CGImage;
Причина: каждое представление поддерживается классом CALayer.Согласно документации на CALayer:
contents
An object that provides the contents of the layer. Animatable.
<code>
@property(retain) id contents
</code>
Discussion
A layer can set this property to a CGImageRef to display the image as its contents. The default value is nil.
И да, это свойство является анимируемым.Это означает, что на этом слое можно выполнить приятные переходы на основе CoreAnimation.Примечание: будьте осторожны, если вы поддерживаете несколько ориентаций.