首页 > 学院 > 开发设计 > 正文

TableViewCell 点击跳转多个不同的界面

2019-11-07 23:47:12
字体:
来源:转载
供稿:网友

app中我们页面很多时候是tableView设置的,根据不同的Cell跳转到不同的页面:

首先我们获取要跳转的ViewController的名称,将这些名称添加到数组中

 NSArray*  array =@[@"MapDescriptionController",@"CLayerViewController",@"CATransitionViewController",  @"AttributeViewController",@"OtherAaimeViewController",@"VideoImageViewController"];

跳转的设置:

    UIViewController *vc =[NSClassFromString(array[indexPath.row]) new];    vc.hidesBottomBarWhenPushed = YES;  //此处设置是跳转之后隐藏TabBar    [self.navigationController pushViewController:vc animated:YES];                                                          


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表