以下代码用于在swift 2.2中编译,不再是swift 3.0.我们如何解决这个问题?
原文链接:https://www.f2er.com/swift/319841.htmlError: Binary operator ‘===’ cannot be applied to operands of type ‘Any?’ and ‘UIBarButtonItem!’
override func prepare(for segue: UIStoryboardSegue,sender: Any?) { if sender === saveButton { // Error! // ... } else if sender === closeButton { // Error! // ... } }