【发布时间】:2011-07-22 00:47:22
【问题描述】:
我正在尝试根据从设置文件中获取的变量加载 NIB。这是代码:
//select the right nib name
NSString *nibVar = [nibs objectForKey:@"controller"];
// create the view controller from the selected nib name
UIViewController *aController = [[UIViewController alloc] initWithNibName:nibVar bundle:nil];
aController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:aController animated:YES];
[aController release];
不幸的是,这不起作用。
这里有什么想法吗?
谢谢
【问题讨论】:
-
什么不起作用?控制台是否显示错误?什么都没发生?
-
它给出了这个错误:***由于未捕获的异常'NSUnknownKeyException'而终止应用程序,原因:'[
setValue:forUndefinedKey:]:这个类不符合键值编码键滚动条。'
标签: iphone uiviewcontroller xib nib