It is simply done like this :

[code= »c »] UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@ »Title of the box » message:@ »The message to show » delegate:self cancelButtonTitle:@ »OK » otherButtonTitles:nil];;;[/code]

The best you can do is create a method, on a separate .h / .m file couple so you’ll be able to call it anytime, like this :[code= »c »] + (void)alert:(NSString *)title message:(NSString *)theMessage button:(NSString *)buttonTitle {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:theMessage delegate:self cancelButtonTitle:buttonTitle otherButtonTitles:nil];