iOS - UITableView Non-Static background image

Go To StackoverFlow.com

1

I've read a lot of solutions to add a background image to a UITableView where the image will be static and the cells will scroll above it. However, I have yet to find a solution to setting an image that will scroll with the table. When I execute the following code parts of the background image are propogated up into the background image of each cell.

self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"paper.png"]];

Can somebody please tell me if there is a way to do what I want in iOS 5? Cheers Brian

2012-04-05 23:49
by Brian Boyle
possible duplicateMat 2012-04-05 23:55
Check out the 2011 WWDC videos (developer/Apple.com/videos). I think there's one on table views. If I remember correctly, it address this question or something close - StephenAshley.developer 2012-04-06 03:22


0

You'll have to subclass UIView and implement a custom drawRect: method, and tile your image there using UIImage drawing methods (or even the Core Graphics ones).

2012-04-05 23:52
by Aditya Vaidyam
Ads