Earlier I asked the question UIAlertController image how to add to the picture, it was added, but for some reason it is completely blue, is it possible to somehow somehow remove the style?

let image = UIImage(named: "myAlertImage") var action = UIAlertAction(title: "title", style: .Default, handler: nil) action.setValue(image, forKey: "image") alertController.addAction(action) 

    1 answer 1

    You need to set the renderingMode.AlwaysOriginal . It can only be set during initialization, so do something like this.

     let image = UIImage(named: "myAlertImage") image = image?.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal) var action = UIAlertAction(title: "title", style: .Default, handler: nil) action.setValue(image, forKey: "image") alertController.addAction(action) 
    • I did not know about this, thank you) - Leci