View Single Post
  #6 (permalink)  
Old February 6th, 2011, 05:27 PM
Gryphon Gryphon is offline
Registered User
 
Join Date: Feb 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by milpitian View Post
I inserted the code on viewDidLoad, but like the person above still showing a blank screen.

Code:
/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
 UIAlertView *alert = [[UIAlertView alloc]
 initWithTitle:@"Hello"
 message:@"This is an alert view"
 delegate:self
 cancelButtonTitle:@"OK"
 otherButtonTitles:nil];
 
 [alert show];
 [alert release];
 [super viewDidLoad];
}
*/
You need to remove the "/*" and "*/" surrounding viewDidLoad (highlighted in red). They mark the beginning & end of a comment block & cause the compiler to ignore everything in between. That also explains why the text was all green.