我做的是 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];}