Glen020
Glen020

Reputation: 187

UIAlert View to use Button at index 2 ONLY

Ui alert view can pop up multiple times during my one view controller. I want it to do different things. sometimes just want it to do cancel, other i want it to perform actions at button index 2 only (dont offer cancel)

Any ideas?

Upvotes: 0

Views: 202

Answers (1)

Raptor
Raptor

Reputation: 54212

Just set the cancelButton to nil. Also in your UIAlertViewDelegate, handle click only from buttonIndex = 2.

Upvotes: 1

Related Questions