原官网文档方案如下,在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!)

{

//

}

04-28 21:52