I have a UIViewcontoroller subclass and the following code is in my viewdidload ,
CGRect cellFrame = CGRectMake(0, 0, 320, 44);
UIImageView *myImageView = [[UIImageView alloc] initWithFrame:cellFrame ] ;
[myImageView setImage:[UIImage imageNamed:@"first.png"]];
self.view=myImageView;
[super viewDidLoad];
The image file is in the same directory as the class files. The issue is when the app is loaded the image is not shown just a blank screen.
Thanks
please check if
[UIImage imageNamed:@"first.png"]is returning a nil?