我正在嘗試開發一個應用程序,使用條形圖通過使用iOS Charts
。我剛剛成立cocoapods
文件,進口Charts.framework
和編譯了該項目,我得到了以下錯誤:iOS圖表編譯錯誤
/Users/i3t/Desktop/AppAdmin/eCardFidAdmin/Pods/Charts/Source/Charts/Utils/ChartPlatform.swift:111:30: Method does not override any method from its superclass
此錯誤是在這個函數中發生的事情:
public final override func touchesCancelled(touches: Set<NSUITouch>, withEvent event: NSUIEvent?)
{
self.nsuiTouchesCancelled(touches, withEvent: event)
}
我刪除重寫的語句和我得到了這個新的錯誤:
/Users/i3t/Desktop/AppAdmin/eCardFidAdmin/Pods/Charts/Source/Charts/Utils/ChartPlatform.swift:111:21: Method 'touchesCancelled(:withEvent:)' with Objective-C selector 'touchesCancelled:withEvent:' conflicts with method 'touchesCancelled(:withEvent:)' from superclass 'UIResponder' with the same Objective-C selector
有人知道我該如何解決這個問題?
假設這是斯威夫特3簽名改爲'與事件:',而不是'withEvent事件:' – dan
尚不能工作。奇怪的是,其他功能沒有問題,只是功能「touchesCancelled」 –