根据名字字符串挑战到指定的类

 NSDictionary * d=@{@"name":@"zefeng"};
    NSString * name =[[d allKeys]objectAtIndex:0];
    [self presentViewController:[[NSClassFromString(name) alloc]init] animated:YES completion:nil];

posted @ 2015-11-23 17:56  谢小锋  阅读(172)  评论(0)    收藏  举报