我已经使用故事板启动了我的iOS 5应用程序,但是,如果我想以编程方式呈现视图,我如何才能呢?我不能使用initWithNibName,因为它不再有nob文件,而是一个故事板。
例如,这将给我一个空白的UINavigationView,而不是我的界面生成器:
setupView = [[setupController alloc] initWithNibName:nil bundle:nil];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:setupView];
[self presentModalViewController:navigationController animated:YES];如果我使用界面生成器(在我的故事板中)中的一个按钮,并使用'Modal‘将两个视图与它链接起来,它就会很有吸引力,但我想通过编程来实现。
谢谢。
发布于 2011-10-19 19:59:00
事实证明,我一直在寻找performSegueWithIdentifier,它很有魅力。
发布于 2011-10-19 19:22:32
Beginning Storyboards in iOS 5 Part 1详细地解释了所有的事情。
https://stackoverflow.com/questions/7820472
复制相似问题