Dancer Dancer - 5 months ago 47
iOS Question

UITableViewController - Fixed Background Image

Is it possible to fix the position of a UITableViewController background image?

I've added the background image via the viewdidload method with the following code -

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

But as the table is fairly long (and also contains static cells if that matters) it scrolls (and repeats) as you scroll down the table.


you can try to add the background image as UIView and not as UIColor, try this:

 self.tableView.backgroundView = [[UIImageView alloc] initWithImage:
                                 [UIImage imageNamed:@"blurredBGW.png"]];