0
我安裝了一個吊艙Material
和莢有這樣的事情:覆蓋符合協議斯威夫特
extension UIViewController: UIViewControllerTransitioningDelegate {
//here is the method to conform protocol
}
但我需要我自己的貼合在同一個地方的協議:
當我嘗試致以UIViewController
與UIViewControllerTransitioningDelegate
然後我得到了一個錯誤:
redundant conformance to protocol.
我需要做什麼?
extension UIViewController: UIViewControllerTransitioningDelegate {
//my OWN implementation here I need
}
有沒有辦法來覆蓋與我自己的Pod的一致性?
您的超類已經確認了協議 –
它是不是問題的答案:)對不起 –
如果該類已經實現了,則不需要將該協議添加到該擴展中。你不能在一個擴展中重寫一個方法,你最好的選擇是繼承Pod類並覆蓋子類中的方法 – DatForis