我已经设置了一个名为NextViewController
的.xib文件。我试图用这段代码显示它:
NextLevelController *myNextLevelController = [[NextLevelController alloc] initWithNibName:@"NextLevelController" bundle:nil];
[self presentModalViewController:myNextLevelController animated:YES];
但是,它显示为空白显示。我有输入文字的标签和按钮。我究竟做错了什么?
答案 0 :(得分:2)
NextLevelController *myNextLevelController = [[NextLevelController alloc] initWithNibName:@"NextViewController" bundle:nil];
[self presentModalViewController:myNextLevelController animated:YES];
您在代码中使用了错误的xib名称。我已经修好了