Dancer Dancer - 1 year ago 122
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 Source

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"]];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download