Time for action – implementing the Display Alert Dialog method

Our next step is to implement our displayAlertDialog method. This method will be responsible for displaying an alert message to the user when the Display Alert Dialog is pressed. The user will be able to respond to the buttons displayed, which will dismiss the dialog:

  1. Open the GetUsersAttentionViewController.m implementation file.
  2. In the action event which you created for the Display Alert Dialog button, add the following code:
    // Handles of the setting up and displaying of our Alert View Dialog - (IBAction)displayAlertDialog:(id)sender { // Declare an instance of our Alert View dialog UIAlertView *dialog; // Initialise our Alert View Window with options dialog =[[UIAlertView alloc] ...

Get Xcode 4 iOS Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.