Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best Practices for implementing a modal Alert View using Cocoa Touch?

Does anyone have any best practices, tips & tricks, or recommendations for how to create modal Alert Views with Cocoa Touch?

I like to think there is a way to make this difficult task trivial or at least easier.

like image 477
Chris Craft Avatar asked Dec 07 '22 08:12

Chris Craft


2 Answers

You can use something like this:

void AlertWithMessage(NSString *message)
{
/* open an alert with an OK button */
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Name of the Application" 
                                message:message
                                delegate:nil 
                                cancelButtonTitle:@"OK" 
                                otherButtonTitles: nil];
[alert show];
[alert release];
}
like image 164
Geraud.ch Avatar answered Feb 01 '23 23:02

Geraud.ch


I just use UIAlertView to display modal alerts. What additional functionality are you looking for?

like image 23
Ben Gottlieb Avatar answered Feb 01 '23 23:02

Ben Gottlieb