i'm trying to add custom lefBarButton in navigation item but it not showing anything i tried these answers
https://stackoverflow.com/questions/48564480/custom-leftbarbuttonitem-not-showed-in-ios-11
navigation bar button not showing in swift 3
navigation bar button and items not showing in swift 3
Navigation bar button not showing
Bar button item not shown in navigationBar
Navigation bar not showing iOS swift
Swift 3 - Why is my Navigation Bar not showing?
iOS 8 Swift navigation bar title, buttons not showing in tab based application
segue type for my view controller is show.
here is my code
let leftButton = UIButton(type: .roundedRect)
leftButton.addTarget(self, action: #selector(backClick), for: .touchUpInside)
leftButton.setTitle("", for: .normal)
leftButton.tintColor = UIColor.red
leftButton.imageView?.image = UIImage(named: "back-icon")
leftButton.frame = CGRect(x: 0, y: 0, width: 22, height: 15)
self.navigationItem.leftBarButtonItem = UIBarButtonItem.init(customView: leftButton)
i spend hours to fix it. does anyone have have any idea.