Remove corner shadow/offset in grouped UITableView

前端 未结 4 956
[愿得一人]
[愿得一人] 2021-02-05 18:48

When a UITableView of type UITableViewStyleGrouped has a background view that is a non-default color or pattern image on the iPad, the rounded corners have an ugly extra line, s

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-05 19:09

    I replaced the tableView's backgroundView with a new view.

    I then relied on the tableView's backgroundColor property to set the color I wanted:

    self.tableView.backgroundView = [[[UIView alloc] init] autorelease];
    self.tableView.backgroundColor = [UIColor whiteColor];
    

提交回复
热议问题