網格進行跳轉
阿新 • • 發佈:2018-11-14
//點選網格進行跳轉 -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ if(indexPath.row==0){ NSLog(@"點選了1!"); t1ViewController *t1=[t1ViewController new]; [self presentViewController:t1 animated:YES completion:nil]; }else if(indexPath.row==1){ t2ViewController *t2=[t2ViewController new]; [self presentViewController:t2 animated:YES completion:nil]; }else{ t3ViewController *t3=[t3ViewController new]; [self presentViewController:t3 animated:YES completion:nil]; } }