(細節控)swift3.0與融雲IMKIT開發問題(一部分) override func onSelectedTableRow Method does not override any method from its superclass


 原官網文檔方案如下,在swift3.0的情況下出現 override func onSelectedTableRow  Method does not override any method from its superclass

這是因為swift3.0 有很多變更,需要更換下onSelectedTableRow參數。

   //重寫RCConversationListViewController的onSelectedTableRow事件

    override func onSelectedTableRow(conversationModelType: RCConversationModelType, conversationModel model: RCConversationModel!, atIndexPath indexPath: NSIndexPath!) {

        //打開會話界面

        let chat = RCConversationViewController(conversationType: model.conversationType, targetId: model.targetId)

        chat.title = "想顯示的會話標題"

        self.navigationController?.pushViewController(chat, animated: true)

    }

//obj 文件中的定義

 - (void)onSelectedTableRow:(RCConversationModelType)conversationModelType

     conversationModel:(RCConversationModel *)model

     atIndexPath:(NSIndexPath *)indexPath;

 

swift3.0  修正后的

    override func onSelectedTableRow(_ conversationModelType: RCConversationModelType, conversationModel model: RCConversationModel!, at indexPath: IndexPath!)

    {

    //

    }


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM