当前视图控制器ios7

当前视图控制器ios7,ios7,xcode5,presentviewcontroller,Ios7,Xcode5,Presentviewcontroller,我使用一个tabBarVC,在其中一个选项卡视图中,我想显示一个视图。我加了一个按钮。添加了以下代码: - (IBAction)showChart:(id)sender { UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; woundViewController *privacy = (woundViewController*)[storyboard ins

我使用一个tabBarVC,在其中一个选项卡视图中,我想显示一个视图。我加了一个按钮。添加了以下代码:

 - (IBAction)showChart:(id)sender {

    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    woundViewController *privacy = (woundViewController*)[storyboard     instantiateViewControllerWithIdentifier:@"privacy"];

    // present
    [self presentViewController:privacy animated:YES completion:nil];

}
我想展示的新VC已经分配了标识符“隐私”

但我得到了这个错误:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[flipSideViewController _setViewDelegate:]: 

我认为这是您设置视图控制器的方式,当前代码看起来是正确的

我想试试这个

- (IBAction)showChart:(id)sender {

woundViewController *privacy = [[woundViewController alloc]init];
// present
[self presentViewController:privacy animated:YES completion:nil];
}

这使得它没有抛出错误,但它没有在主视图中显示我设置的视图。它呈现出一个黑屏。我希望它从woundVC=>flipsideVC开始