您的位置:首页 > 其它

在自定义cell里面实现跳转的方法

2015-08-19 11:00 369 查看
我做的是
collectionView 里面铺了一个 tableView ,tableView写在了自定义的cell里;


在自定义里面无法实现跳转功能, 在ViewComtroller里面签一个代理,
<UITableViewDelegate>


在引一下需要跳转页面的头文件;



在CollectionViewCell 的代理中签代理人 cell.tableView.delegate = self;



在实现跳转方法;

// 点击方法,跳转

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

TwoViewController *two = [[TwoViewController alloc] init];

[self.navigationController pushViewController:two animated:YES];

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: