简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM