Fork me on GitHub

UIView 背景

- 自带颜色

[self setBackgroundColor:[UIColor lightGrayColor]];


- 自己设定颜色

 

// R: 128 G: 90 B: 200

UIColor *myColor = [UIColor colorWithRed:(128.0 / 255.0green:(90.0 / 255.0blue:(200.0 / 255.0alpha:1];

 


- 自己设定背景图

 

self.view.backgroundColor = [[UIColor allocinitWithPatternImage:[UIImageimageNamed:@"whiteBackground.png"]];

posted on 2012-03-06 14:57  pengyingh  阅读(121)  评论(0)    收藏  举报

导航