How can we align action sheet label to left like in iTunes and pages

1.4k Views Asked by At

iTunes Image

I am able to align image to right but not able to set the label of action sheet to left. I have used paragraph style and tried to align it but it doesn't act like a normal button and not able add image to it.

This is what I am able to achieve

. In UIAlertController I am NOT able to access label through subviews. Can anyone suggest any way to achieve this.

1

There are 1 best solutions below

0
On

I use this.

let action = UIAlertAction(title: "Add to a Playlist", style: .default, handler: nil)
action.setValue((Your Alignment), forKey: "_titleTextAlignment")
action.setValue((Your Image), forKey: "_image")