Has anyone had any success creating an info button (italic \'i\' in a circle) in code (read: without Interface Builder), and then assigning it as the right bar button item of a
For Swift:
func addRightNavigationBarInfoButton() {
let button = UIButton(type: .infoDark)
button.addTarget(self, action: #selector(self.showInfoScreen), for: .touchUpInside)
self.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: button)
}
@objc func showInfoScreen() {
// info bar button pressed
}