故事板导航项目链接到UI控制器
问题描述:
我创建了一个拆分视图项目,在iPhone的故事板上,我将一个栏按钮项目拖到导航右侧并更改样式添加,然后将视图控制器拖到故事板,所以我使用控制拖动来建立链接,并更改uiviewcontroller的自定义类“AddViewController”,当我运行该项目并推动DetailViewController时,它是黑色的视图。故事板导航项目链接到UI控制器
,我已经输入的代码在AddViewController.m
-(void) viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil];
UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"AddViewController"];
[vc setModalPresentationStyle:UIModalPresentationCurrentContext];
[self presentModalViewController:vc animated:YES];
}
答
我找到了原因 在我的创造“AddCreateViewController”,我要发表评论的功能。
- (void)loadView
{
// If you create your views manually, you MUST override this method and use it to create your views.
// If you use Interface Builder to create your views, then you must NOT override this method.
}