原官網文檔方案如下,在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!)
{
//
}