Open kmishukov opened 5 years ago
I have added constraints that fix bug, when FaveButton is untouchable when it is added to navigation bar as UIBarButtonItem(customView: FaveButton), this problem occurred on iOS 11 and higher.
class ViewController: UIViewController, FaveButtonDelegate { let myButton = FaveButton(frame: CGRect(x: 0, y: 0, width: 24, height: 24), faveIconNormal: UIImage(named: "star")) override func viewDidLoad() { super.viewDidLoad() myButton.delegate = self navigationItem.rightBarButtonItem = UIBarButtonItem(customView: myButton) } func faveButton(_ faveButton: FaveButton, didSelected selected: Bool) { print("Button pressed!") } }
Can this be merged please?
I have added constraints that fix bug, when FaveButton is untouchable when it is added to navigation bar as UIBarButtonItem(customView: FaveButton), this problem occurred on iOS 11 and higher.