How do I set a background image for a grouped table view?

后端 未结 6 1748
萌比男神i
萌比男神i 2020-12-14 11:55

I\'ve seen some iPhone applications that use a custom image as the background for a grouped UITableView, instead of the standard gray lines.

How is this achieved?

6条回答
  •  一个人的身影
    2020-12-14 12:22

    You can use the +[UIColor colorWithPatternImage:(UIImage)] method like so:

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

提交回复
热议问题