iOS using default color on image rendered as template
问题 I've a set of images in the asset catalog, and every image has a own color. I need to show this icon all in gray when the device is offline. The problem is: when I set template mode on image in asset catalog I can't be able to use the image in it's default color set. I would like to avoid to generate double icons. Ideas? 回答1: If the image is solid without background, you can tint it. UIImage *image = [UIImage imageNamed:@"name"]; if (online) { imageView.image = image; } else { imageView.image