kchromik
kchromik

Reputation: 1388

UIAlertView should highlight different button

I have an UIAlertView which highlights the Cancel button, but it should highlight the other one. Switching the buttons is not an option.

This is how I initialised the Alert:

let downloadAlert = UIAlertView(title: NSLocalizedString("Title", comment: ""),
                message: NSLocalizedString("Message", comment: ""),
                delegate: self,
                cancelButtonTitle: NSLocalizedString("Cancel", comment: ""),
                otherButtonTitles: NSLocalizedString("Okay", comment: ""))

And this is how it looks: enter image description here Thanks for your help.

Upvotes: 0

Views: 343

Answers (1)

LinusG.
LinusG.

Reputation: 28902

Looks like you can't simply change the UIAlertView's style. I think you need to access the buttons you want to modify externally. Therefore see the following link.

Upvotes: 1

Related Questions