I am trying to set a custom image for the back button that automatically gets place onto a navigation bar when a new view is pushed onto the stack.
I have tried add
This worked for me:
let button1 = UIBarButtonItem( image: #imageLiteral(resourceName: "back_arrow"), style: .plain, target: self, action: #selector(self.backBtnTapped(_:)) ) self.navigationItem.leftBarButtonItem = button1