I try to create a NavBar, so far the NavBar is no problem but when I try to add the buttons and title, they don\'t get displayed
My NavBar look like
let
Updated for Swift 5
Create a navigation item instance and set title and right/left buttons to it. After navigation item is configured add it to the navigation bar.
let navBar = UINavigationBar(frame: CGRect(x: 0, y: 0, width: view.frame.size.width, height: 44))
view.addSubview(navBar)
let navItem = UINavigationItem(title: "SomeTitle")
let doneItem = UIBarButtonItem(barButtonSystemItem: .done, target: nil, action: #selector(selectorName:))
navItem.rightBarButtonItem = doneItem
navBar.setItems([navItem], animated: false)