2016-11-11 61 views
-1

我剛剛遷移到swift 3,我得到這個錯誤模糊使用rowindexPath相同sectionitemswift 3 ambigous使用'行'

其他屬性只是像count一樣工作。

很可能是因爲推斷。

enter image description here

這裏是模棱兩可:

screenshot

以下是完整的日誌截圖:

enter image description here

我使用AlecrimCoreData第三方,它有以下擴展名:

// MARK: - IndexPath extensions 

    extension IndexPath { 

     public init(forRow row: Int, inSection section: Int) { 
      self.init(indexes: [section, row]) 
     } 

     //public var section: Int { return self[0] } 
     public var row: Int { return self[1] } 

    } 

如果我只是註釋掉這一行public var row: Int { return self[1] }我的代碼編譯成功。

+0

你能從報告導航器中看到完整的編譯器錯誤信息嗎? –

+0

當你點擊「找到這個候選人」的消息時,他們每個人都會告訴你什麼? –

+0

它什麼也沒有顯示。 –

回答

1

AlecrimCoreData定義IndexPathrow屬性,它與UIKit中定義的existing row property衝突。

刪除AlecrimCoreData中的定義來解決問題。