Displaying the Alert

The show instance method tells your alert to appear. When shown, the alert works in a modal fashion. That is, it dims the screen behind it and blocks user interaction with your application outside the alert. This modal interaction continues until your user acknowledges the alert through a button tap, typically by selecting OK or Cancel. When the user does so, control passes to the alert delegate, allowing that delegate to finish working with the alert and respond to the selected button.

The alert properties remain modifiable after creation. You may customize an alert by updating its title or message properties. The message is the optional text that appears below the alert title and above its buttons. You can add more buttons ...

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.