I have a side menu that slides out to display a table view and from there I have segues that use the reveal view controller. The segue has to connect directly to the view co
Swift 4 Version
let navigationBar = UINavigationBar(frame: CGRect(x: 0, y: 0, width: 320, height: 50))
navigationBar.barTintColor = UIColor.lightGray
view.addSubview(navigationBar)
let cancelButton = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: nil)
let doneButton = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: nil)
let navigationItem = UINavigationItem(title: "Title")
navigationItem.leftBarButtonItem = cancelButton
navigationItem.rightBarButtonItem = doneButton
navigationBar.items = [navigationItem]