(细节控)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