I added UIButton with custom image and no text to Navigation Bar in one of my View Controllers. In that Navigation bar is also default button Back.
I connected that UIButton with Connection: Action, Type: UIButton, Event: Touch Up Inside and Arguments: Sender.
When I click on that button nothing happens, it's not registering touch at all. Button Back is working normally.
Why is this happening? How to fix it?

button'ssize you did not set , and it may be too small - aircraftnavigationController?.navigationBar.addSubview(myButton)ornavigationItem.rightBarButtonItem = UIBarButtonItem(customView: myButton)? - paulvsMain.storyboardto Navigation Bar and then connected it withView Controllerjust like you normally connect button. - user3847113