If you want to display your own Error or Alert messages in your iPhone application, you need to use the UIAlertView. This simple snippet will show you how to do that.
UIAlertView * alertView = [[UIAlertView alloc] initWithTitle: @"My Error" message: @"This is my error message." delegate: nil cancelButtonTitle: @"OK" otherButtonTitles: nil];
[alertView show];
[alertView release];
This piece of the code can be placed into some action like UIButton has been pressed or something like that.
We had to disable comments till the problem with spam will be solved, sorry for any inconvenience caused.