iOS写好好友列表之后,不知道该怎么在cell的点击事件里面跳转到与该好友单聊的界面,需要传值的知道,但是具体怎么写不知道啊
如题
//cell跳转
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if (_delegate && [_delegate respondsToSelector:@selector(userListViewController:didSelectUserModel:)]) {
// id model = nil;
EaseUserModel *model = nil;
if ([_dataSource respondsToSelector:@selector(userListViewController:userModelForIndexPath:)]) {
model = [_dataSource userListViewController:self userModelForIndexPath:indexPath];
}
else {
model = [self.buddyArray objectAtIndex:indexPath.row];
}
if (model) {
[_delegate userListViewController:self didSelectUserModel:model];
}
}
}
就是这里面我应该怎么写呢
//cell跳转
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if (_delegate && [_delegate respondsToSelector:@selector(userListViewController:didSelectUserModel:)]) {
// id
EaseUserModel *model = nil;
if ([_dataSource respondsToSelector:@selector(userListViewController:userModelForIndexPath:)]) {
model = [_dataSource userListViewController:self userModelForIndexPath:indexPath];
}
else {
model = [self.buddyArray objectAtIndex:indexPath.row];
}
if (model) {
[_delegate userListViewController:self didSelectUserModel:model];
}
}
}
就是这里面我应该怎么写呢
没有找到相关结果
已邀请:
2 个回复
[已注销]
夏征宇 - 90后