Light gray background in “bounce area” of a UITableView

前端 未结 16 2107
一整个雨季
一整个雨季 2020-11-28 23:05

Apple\'s iPhone apps such as Music and Contants use a search bar in a UITableView. When you scroll down so that the search bar moves down, the empty space above the scroll v

16条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 23:10

    In my case the solution was to create a headerview for the table and assign a color, it solved the black background in bounce area in my apps when in dark mode. I did the same to its tableFooterView.

     table.tableHeaderView = UIView()
     table.tableHeaderView!.backgroundColor = UIColor.white
        
    

提交回复
热议问题