从字典中获的字符串,然后进行跳转
1 if ([dic objectOrNilForKey:@"jump"]) {//从字典取值 2 NSString *jumpString = [dic objectOrNilForKey:@"jump"]; 3 Class jumpClass = NSClassFromString(jumpString); //将字符串转变成类 4 id jumpVc = [[jumpClass alloc]init];//类进行实例化,接收用id 5 [self.navigationController pushViewController:jumpVc animated:YES]; 6 return; 7 }
时间: 2024-11-09 02:57:47