Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell Xcode to automatically set image asset render mode in iOS 7

In Xcode 6 you can tell any image in an assets catalog to always Render As Default, Original Image or Template Image through the Attributes inspector. Like this

enter image description here

But this only works for iOS 8, not for iOS 7.

Is there a way to do the same but working on iOS 7 as well?

Note: I'm not looking for programmatic solutions (like those using things like image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];), but for a declarative one, either in images.xcassets panels or in storyboards and nibs.

like image 868
sonxurxo Avatar asked Dec 04 '14 12:12

sonxurxo


1 Answers

It looks like if you set the button type to "System" (vs "Custom"), "templating" behaves as expected under iOS 7 for button images. Unfortunately, it still does not work for button background images and it does not allow using custom images for any other state than "Default".

like image 130
Grigory Entin Avatar answered Oct 04 '22 05:10

Grigory Entin