看到就震惊了的代码

来源:互联网 发布:js动态添加table 编辑:程序博客网 时间:2024/05/17 03:42

【1】利用Runtime实现跳转到指定的VC

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{    NSString *demoClassString = [NSString stringWithFormat:@"DemoVC%ld", indexPath.row];    [self.navigationController pushViewController:[NSClassFromString(demoClassString) new] animated:YES];}


0 0
原创粉丝点击