- 首先集体做的是push 操作.
- 先将跳转的目标类 以类名的字符串格式存储在一个数组中
@property (nonatomic,strong) NSArray *dataSourceArray;
_dataSourceArray = @[@"LineVC",@"SlipLineVC",@"CandleLineVC",@"TimeLineVC"];
- 在didselected方法中 根据下标indexPath.row 获取对应角标的 类名字符串
- 获取类名字符串对应的类
- 创建 实例对象
- push操作
NSString *vcName = _dataSourceArray[indexPath.row];
Class class = NSClassFromString(vcName);
UIViewController *vc = [[class alloc] init];
[self.navigationController pushViewController:vc animated:YES];