2011-07-08
UIView *myView = [[UIView alloca] init];
[myView setBackgroundColor:[UIColor redColor]];
//下面是一个内置的颜色
blackColor;
darkGrayColor;
lightGrayColor;
whiteColor;
grayColor;
redColor;
greenColor;
blueColor;
cyanColor;
yellowColor;
magentaColor;
orangeColor;
purpleColor;
brownColor;
clearColor;//清空背景颜色,也可以理解为透明色
//使用图片来定义View的背景颜色
UIColor *color = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"bgd.jpg"]];
浙公网安备 33010602011771号