UIView, UIButton UILabel , . .
:

override func viewDidLoad() {
super.viewDidLoad()
var customView = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 100.0, height: 44.0))
customView.backgroundColor = UIColor.yellow
var button = UIButton.init(type: .custom)
button.setBackgroundImage(UIImage(named: "hamburger"), for: .normal)
button.frame = CGRect(x: 0.0, y: 5.0, width: 32.0, height: 32.0)
button.addTarget(self, action: #selector(menuOpen(button:)), for: .touchUpInside)
customView.addSubview(button)
var marginX = CGFloat(button.frame.origin.x + button.frame.size.width + 5)
var label = UILabel(frame: CGRect(x: marginX, y: 0.0, width: 65.0, height: 44.0))
label.text = "Inbox"
label.textColor = UIColor.white
label.textAlignment = NSTextAlignment.right
label.backgroundColor = UIColor.red
customView.addSubview(label)
var leftButton = UIBarButtonItem(customView: customView)
self.navigationItem.leftBarButtonItem = leftButton
}
func menuOpen(button: UIButton) {
}