Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIViewController with background image

How can I insert into my UIViewController an image from the resources as background image? thanks in advance!

like image 214
ghiboz Avatar asked Jun 07 '10 15:06

ghiboz


1 Answers

Add it UIViewController's view, somewhat like this:

- (void) viewDidLoad 
{
   UIImage *background = [UIImage imageNamed: @"background.png"];    
   UIImageView *imageView = [[UIImageView alloc] initWithImage: background]; 

   [self.view addSubview: imageView]; 

   [imageView release];

   [super viewDidLoad];
}
like image 145
luvieere Avatar answered Sep 19 '22 18:09

luvieere