I am currently trying to put a UITableView
in a different location rather than at the top of my view controller. With this said, it is trying to add the header
Try with remove tableHeaderView and tableFooterView
var frame = CGRect.zero
frame.size.height = .leastNormalMagnitude
tblView.tableHeaderView = UIView(frame: frame)
tblView.tableFooterView = UIView(frame: frame)
Check your tableview frame in storyboard or xib. Mine by default has a y position value, hence the bug
I am doing this programmatically, and I simply moved my addSubview(tableView) to the bottom after adding all of my other subviews, and it solved my problem!
Not sure why this only appears on device and not my simulator, but either way at least there is a simple solution!
UIView can be inserted at the top and bottom of the table(drag and drop). Set their properties as transparent and height of 1 px. This is to remove the extra padding in front of the cells.
I also had this problem the tableView wasn't the last view in the hierarchy. In my case i had a view above (even though they were not overlapping each other), so i dragged it above the tableView in the hierarchy and that made it.
I can't say for sure but it looks like you've got an extra UIView stuck between where the Prototype Cells begin and the top of the UITableView. My image looks exactly like yours if you remove the text/lines I added in.