Change background of a grouped UITableView

后端 未结 8 691
情歌与酒
情歌与酒 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:38

    tableView.backgroundView = nil;
    tableView.backgroundColor = [UIColor colorWithPatternImage: xxx];
    // tableView.backgroundColor = [UIColor redColor];  // is ok
    

    if you set set the backgroundColor as this, when you scroll the tableView, the backgroundColor view will scroll also. so, you can: tableView.backgroundView = nil; self.view.backgroundColor = ...

提交回复
热议问题