What is this view that appears floating over the tableView ?

I have a tableView inside a UIView in a VC.

This VC is in a navigation view. It is a UIViewController, not a UITableViewController.

The VC set up is this one:

The issue:

When I run app, there is a bar (full width, about 25 pixels high) appearing over the tableView at the bottom, hiding partially a cell (we see the (i) button nearly completely hidden). When scrolling tableView, this bar does not move and hides other cell.

I looked at the view in debugger (I edited the content of cells):

and found that the bar which is hiding comes from navigation controller:

So 2 questions:

  • what is this view ?
  • How to avoid it coming over the table view ?

I have a solution by replacing upperView by a header in tableView, but I would like to understand what goes on here.

Answered by Claude31 in 708014022

Got FB answer. And bug was on my side. I created a view in navigationView…

Probably a recycled view, separator, extended nav bar, ... are you able to recreate the same behaviour in another sample project?

There were other project with the same issue. It was solved by implementing     func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { 0 }. But that does not work here.

I recreated the navigation controller. Problem persists. So th cause is probably not in NavigationController (as debug view suggested) but in the tableView itself.

So I turned tableView background to red: the parasite view is red. So it is the background showing:

I turned it to clear, and that solved the problem.

But I still cannot understand why the background appears here. I tried to set the tableView row height from automatic to actual height, no change.

I filed a bug report bout View debugger. Mar 1, 2022 at 6:49 PM – FB9936973

Accepted Answer

Got FB answer. And bug was on my side. I created a view in navigationView…

What is this view that appears floating over the tableView ?
 
 
Q