【发布时间】:2014-05-23 23:04:26
【问题描述】:
我在我的项目中同时使用情节提要和 xib,我想从情节提要中获取 xib 文件,但无法反转它。那么我如何从 xib 文件转到情节提要。提前谢谢。 故事板到 xib:
Dashboard1ViewController *tempView = [[Dashboard1ViewController alloc] initWithNibName:@"Dashboard1ViewController" bundle:nil];
tempView.passemail = [matches valueForKey:@"email"];
[self.view addSubview:tempView.view];
它工作得很好,但是我使用了这个代码的 xib 到情节提要
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"loginUI" bundle:nil];
login2ViewController *vc = [sb instantiateViewControllerWithIdentifier:@"login2"];
vc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentViewController:vc animated:YES completion:NULL];
但它不起作用。
【问题讨论】:
标签: objective-c storyboard xcode5 xib