iOS -color设置image

UIColor *color = [UIColor colorWithPatternImage:[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1506592297456&di=bd8fa3c828ed79d0d5097026d01c8463&imgtype=0&src=http%3A%2F%2Fpic16.photophoto.cn%2F20100801%2F0036036385989333_b.jpg"]]]];//使用半透明图片作为label的背景色

你可能感兴趣的:(iOS -color设置image)