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

后端 未结 6 1747
萌比男神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:17

    self.parentViewController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"SortByCategory_320x480.png"]];
    
    self.tableView.separatorColor = [UIColor clearColor];
    
    self.tableView.backgroundColor = [UIColor clearColor];
    

    Hope this will help. It won't display hideous translucent background behind the cells especially in case of Grouped UITableView.

提交回复
热议问题