- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if (_delegate && [_delegate respondsToSelector:@selector(conversationListViewController:didSelectConversationModel:)]) {
EaseConversationModel *model = [self.dataArray objectAtIndex:indexPath.row];
[_delegate conversationListViewController:self didSelectConversationModel:model];
} else {
EaseConversationModel *model = [self.dataArray objectAtIndex:indexPath.row];
EaseMessageViewController *viewController = [[EaseMessageViewController alloc] initWithConversationChatter:model.conversation.conversationId conversationType:model.conversation.type];
viewController.title = model.title;
[self.navigationController pushViewController:viewController animated:YES];
}
}
@interface ConversationListController : EaseConversationListViewController
self.delegate = self;
环信这里,父类的代理子类来实现,直接self.delegate = self;