Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tint UIButton's image from interface builder with UIImageRenderingModeAlwaysTemplate

I have a UIButton whose image property I'm setting from interface builder. I want this image to be tinted with the superview's tintColor. With code, I can set the image's rendering mode to UIImageRenderingModeAlwaysTemplate, but how do I do this from interface builder?

like image 541
rounak Avatar asked Aug 05 '14 20:08

rounak


1 Answers

Got it after a bit of looking around. I had the button type as custom in IB, but switching it to system type now uses the template rendering mode for the UIButton's image.

like image 99
rounak Avatar answered Nov 15 '22 03:11

rounak