来个大神帮帮忙啊 求详细代码

解决方案 »

  1.   

    didselectcell里面push
      

  2.   

    -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
        //在这里算中UICollectionViewCell Item 对象
    // 在编写方法
    }
      

  3.   

    不管UICollectionView嵌套在哪个View里面,它的事件处理函数都是:
    - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath所以在上述方法处理即可;
      

  4.   

    -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
    //写跳转语句
    //其实和tableview的点击跳转是差不多的
    }
      

  5.   

    http://www.cnblogs.com/ios8/p/iOS-UICollectionView.html
    可以参考这个网页
      

  6.   

    -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
    {
             NSLog(@"教练%ld====%ld",(long)indexPath.section,(long)indexPath.row);
       
        NSLog(@"教练id:%@",model.coachId);
        UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:gao];
                 nc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
          [self.view.window.rootViewController presentViewController:nc animated:YES completion:nil];
       // [self  presentViewController:nc animated:YES completion:nil];
        }