I am trying to use PDF files as icons in the application I'm working on. The problem I am facing is that I get inconsistent hue colors.
If I installed the button image from the interface designer, the icon image will appear black at runtime . Everytime. No matter what I try to install from the interface constructor.
I tried to set the button image using code and instead of showing black, white :
let myGraphicFile = UIImage(named: "myPDFImage")
let myButtonImage = myGraphicFile?.imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate)
myButton.setImage(myButtonImage, forState: .Normal)
From the code, no matter what I try to set the hue to, it is always white from the code.
I found this post related to Xcode 6.x, but I think it can be dated since I can partially do this, but I canโt set the hue.
Use PDF in Xcode for AppIcon (.appiconset Collection)
I create icons in Inkscape, save as PDF 1.5. I am adding the file to Images.xcassets
. In the attribute inspector, Images.xcassets'
I set:
Devices for universal
Scale factor into a single vector.
Summary: I can make it display and scale normally, but it is either black from the interface designer or white from the code. I suspect I am missing something new: how to save a file from Inkscape.
Thanks for reading. If you have any suggestions, I welcome them.