//自定义的UIView
BackView *backView=[[BackView alloc]initWithFrame:CGRectMake(SCREEN_HEIGHT-130, 50, 91, 34)];
//把图片转为颜色
UIColor *bgColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"back.png"]];
//把颜色设置为uiview的背景色
[backView setBackgroundColor:bgColor];
标签:颜色,自定义,UIColor,bgColor,backView,设置,UIView,图片 From: https://blog.51cto.com/u_15907570/5925298