UPDATE 2 : I still hope to get some help in resolving this problem, so I will now clarify my question a bit, that I narrowed it down better.
My hierarchy is UIViewControlleras follows:

The filter view is displayed if the user touches the filter icon and selects the type of lift. The image on the left is what it looks like without the filter selected, and the correct image looks as if the filter is selected. The navigation area (highlighted in green) is what I'm trying to create.

This is what I just can't understand. If I add these two things:
UINavigationBar.appearance().translucent = false
UINavigationBar.appearance().barTintColor = UIColor(hexString: "232B35")
then a space appears between the navigation area and the filter view:

true, , barTintColor .
, UINavigationBar UIViewController. UINavigationItem, .
: , UINavigationBar.appearance().translucent = false ( , , )?
. !
, :
. UIViewController ThemeManager struct , , :
static func applyTheme(theme: Theme) {
sharedApplication.delegate?.window??.backgroundColor = UIColor(hexString: "232B35")
UINavigationBar.appearance().translucent = false
UINavigationBar.appearance().barTintColor = UIColor(hexString: "232B35")
UINavigationBar.appearance().setBackgroundImage(
UIImage(),
forBarPosition: .Any,
barMetrics: .Default)
UINavigationBar.appearance().shadowImage = UIImage()
UIStatusBarStyle.LightContent
UILabel.appearance().textColor = UIColor(hexString: "768DAA")
}
}
ViewController , , - , :

, :

, UINavigationBar.appearance().translucent UINavigationBar.appearance().barTintColor, . UINavigationBar . , , , , , :

VC : VC, , , UINavigationBar , VC . UINavigationItem . : VC UITableView, UITableViewController.
, , ?
№ 1
UIViewController :

, - UIView @IBOutlet, /img/1e07f4fddbb23e8a010d3ede6928160e.png > , (a UIView), UITableView. , , , .
, , viewDidLoad UIViewController:
LiftLogViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, NSFetchedResultsControllerDelegate {
@IBOutlet var tableView: UITableView!
@IBOutlet weak var navItem: UINavigationItem!
@IBOutlet weak var filterViewHeightConstraint: NSLayoutConstraint!
@IBOutlet weak var clearFilterButton: UIImageView!
@IBOutlet weak var selectedFilter: UILabel!
@IBOutlet weak var clearButtonHeightConstraint: NSLayoutConstraint!
@IBOutlet weak var clearButtonView: UIImageView!
let coreDataStack = CoreDataStack()
var liftEvents = [LiftEvent]()
var isFilterViewOpen = false
override func viewDidLoad() {
let doneButton = UIBarButtonItem(title: "Done", style: .Plain, target: self, action: #selector(self.dismissLog(_:)))
let filterImage = UIImage(named: "filter_icon")
let filterButton = UIBarButtonItem(image: filterImage, style: .Plain, target: self, action: #selector(self.actionFilter))
self.navItem.rightBarButtonItems = [doneButton, filterButton]
let buttonTap = UITapGestureRecognizer(target: self, action: #selector(self.clearFilter))
clearFilterButton.addGestureRecognizer(buttonTap)
filterViewHeightConstraint.constant = 0.0
clearButtonHeightConstraint.constant = 0.0
super.viewDidLoad()
}