views:

36

answers:

2

I have this code to set the background image of the UITableViewController:

self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bg5.jpg"]];

Thats in viewDidLoad.

On scrolling the table the part of that background image around each section goes with it, annoyingly. If I add a title and header to these sections then the background goes with that too. :/

Any ideas what is causing this?

EDIT it doesn't seem to be taking the background with it to be honest, its as if each section has its own version of the background - which is even more annoying, because even when stationary the background looks out of place.

Thanks

Tom

A: 

if you are using a UITableViewCell. In Interface Builder try to set all of the outlets background to clear color. but I mean every thing. if you have labels, backgroundImages, even the view everything goes with clear color.

DevDreamers
its ok - I found it (i don't use interface builder) will answer below
Thomas Clayson
I hear you, code works better. tried it and Im loving how it works.
DevDreamers
+1  A: 
self.navigationController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]];
self.tableView.backgroundColor = [UIColor clearColor]; 

does it. :)

Thomas Clayson