Попробуйте, если вы используете UiButton
@IBAction func tapButton(sender: Any) {
print("Tap")
let btn = sender as! UIButton
btn.isUserInteractionEnabled = false
}
Попробуйте, если вы используете UIBarButtonItem
leftButton = UIBarButtonItem(image: UIImage(named: "backimage")!, style: UIBarButtonItemStyle.plain, target: self, action: #selector(self.toggleLeft))
leftButton.title = "Back"
navigationItem.leftBarButtonItem = leftButton
@objc public func toggleLeft() {
print("tap")
leftButton.isEnabled = false
// self.navigationController?.popViewController(animated: true)
}