NSString *className = self.classNames[indexPath.row]; //classNames 字符串数组集
Class class = NSClassFromString(className);
if (class) {
UIViewController *ctrl = class.new;
ctrl.title = _titles[indexPath.row]; //_titles 标题数组集
[self.navigationController pushViewController:ctrl animated:YES];
}
网友评论