Dancer Dancer - 17 days ago 9
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.

Answer

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"]];