Created
November 18, 2013 16:04
-
-
Save 0oneo/7530314 to your computer and use it in GitHub Desktop.
set background of a view, see link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIImage *image = [UIImage imageNamed:@"name.png"]; | |
view.layer.contents = (id) image.CGImage; | |
// 如果需要背景透明加上下面这句 | |
view.layer.backgroundColor = [UIColor clearColor].CGColor; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see link http://www.cnblogs.com/v2m_/archive/2012/07/11/2585547.html