How to customise UIAlertAction?

1k views Asked by At

Am using UIAlertController with UIAlertAction as buttons in it. I would like to add image to the button(UIAlertAction). Any help in this regard will be appreciable.

1

There are 1 answers

0
robahl On

You can add an image/icon:

let action = UIAlertAction(...)
action.setValue(UIImage(named: "image-name", forKey: "image")