UIImage 设置填充色,pop的时候变成gray
2020-05-18 本文已影响0人
唐朝小农民
UIImage *image = [UIImage imageNamed:@"icon.png"];
image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height)];
imageView.tintColor = [UIColor redColor];
//只需要设置下面的属性即可