Wie kann ich ein UII-Bild in Swift färben?

Habe ich ein Bild genannt arrowWhite. Ich möchte die Farbe dieses Bild zu schwarz.

func attachDropDownArrow() -> NSMutableAttributedString {
        let image:UIImage = UIImage(named: "arrowWhite.png")!
        let attachment = NSTextAttachment()
        attachment.image = image
        attachment.bounds = CGRectMake(2.25, 2, attachment.image!.size.width - 2.25, attachment.image!.size.height - 2.25)
        let attachmentString = NSAttributedString(attachment: attachment)
        let myString = NSMutableAttributedString(string: NSString(format: "%@", self.privacyOptions[selectedPickerRow]) as String)
        myString.appendAttributedString(attachmentString)
        return myString
    }

Möchte ich, um dieses Bild in blackColour.
tintColor funktioniert nicht...

InformationsquelleAutor der Frage Sujisha Os | 2015-08-04

Schreibe einen Kommentar