Tuesday, January 21, 2014

Displaying Alerts with UIAlertView

You want to display a message to your users in the form of an alert(Popup Box). This could be used to ask them to confirm an action, ask for their username and password, or simply let them enter some simple text that you can use in your app.


UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Title"
message:@"Message" delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil];

[alertView show];