iPhone - Setting background on UITableView
Posted
by Hans Espen
on Stack Overflow
See other posts from Stack Overflow
or by Hans Espen
Published on 2009-05-22T15:04:26Z
Indexed on
2010/03/17
2:41 UTC
Read the original article
Hit count: 505
Is there any way to set a background view on a UITableViewController?
I try with the code I am using on a UIViewController, but the view comes over all the contents of the table view, and if I add the background view in the cellForRowAtIndexPath-method, it is not showing at all. Anyone done this before or have an idea on how it can be done? Here is the code I am using:
UIImage *image = [UIImage imageNamed: @"background.jpg"];
UIImageView *backImage = [[UIImageView alloc] initWithImage: image];
[self.view addSubview: backImage];
[self.view sendSubviewToBack: backImage];
Thanks
© Stack Overflow or respective owner