Fix empty space that sometimes appeared between the first section and the navigation bar of Feeds

This commit is contained in:
Maurice Parker 2019-09-14 19:51:23 -05:00
parent 11140f2289
commit 4f401099b6
1 changed files with 6 additions and 0 deletions

View File

@ -41,6 +41,12 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
navigationItem.rightBarButtonItem = editButtonItem
// If you don't have an empty table header, UIKit tries to help out by putting one in for you
// that makes a gap between the first section header and the navigation bar
var frame = CGRect.zero
frame.size.height = .leastNormalMagnitude
tableView.tableHeaderView = UIView(frame: frame)
tableView.register(MasterFeedTableViewSectionHeader.self, forHeaderFooterViewReuseIdentifier: "SectionHeader")
tableView.dataSource = dataSource