In my project I used a navigation controller embedding a table view controller. But when I scroll up the table view a black background shows up (as shown in the .gif below)
how can I fix this? Thanks.
In my project I used a navigation controller embedding a table view controller. But when I scroll up the table view a black background shows up (as shown in the .gif below)
how can I fix this? Thanks.
I just found the solution myself. In case someone else has the same problem, here's what to do:
Select your table view
Go to Attribute Inspector
Find the Scroll View section and change the Style property to white
set the properties of scrollview background color as white
I had the same problem and I added following codes:
yourTableView.layer.backgroundColor = UIColor.white.cgColor
I hope it helps.
Set background color to table view in viewDidLoad
override func viewDidLoad() {
super.viewDidLoad()
tableview.backgroundColor = .white
}
© 2022 - 2025 — McMap. All rights reserved.