Change background of a grouped UITableView

后端 未结 8 719
情歌与酒
情歌与酒 2020-12-31 01:16

I\'m having some trouble trying to change the background of a UITableView with groups.

_tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage i         


        
8条回答
  •  被撕碎了的回忆
    2020-12-31 01:51

    What I usually do with grouped UITableViews is set the background color to clear, and the set that pattern image to the parents view.

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

提交回复
热议问题