0
我想分配一個委託給超級ios小部件RideRequestButton。無法在Swift 2.2中實現RideRequestButtonDelegate 2.2
class UberRideRequestButtonDelegate:RideRequestButtonDelegate{
func rideRequestViewController(rideRequestViewController: RideRequestViewController, didReceiveError error: NSError) {
let errorType = RideRequestViewErrorType(rawValue: error.code) ?? .Unknown
print("errorType\(errorType)")
}
func rideRequestButton(button: RideRequestButton, didReceiveError error: RidesError){
}
}
我收到錯誤 - 「類型UberRideRequestButtonDelegate沒有確認到協議RideRequestButtonDelegate」
我得到了這個額外的錯誤:「Fix-It Candidate不是'@objc',但協議要求它。」我點擊修復它,它添加@objc func rideRequestButton – BKSingh
我仍然面臨這個問題,並沒有能夠解決它。你能幫我解決這個問題嗎? – BKSingh
這裏是相關的stackoverflow文章:http://stackoverflow.com/questions/31941771/candidate-is-not-objc-but-protocol-requires-it –