我正在使用故事板。在情节提要上,我有一个“主页”uiviewcontroller,它有一个按钮,当点击该按钮时,它将调用另一个 uiviewcontroller(choosewinner)弹出。但是这个choosewinner vc附有一个uinavigation控制器,原因是它可以轻松地来回走动。现在我可以将 uiview 称为模态弹出窗口,但它不显示它是 uinavigation。
这是点击按钮时调用的方法。想法?
- (void)updateWinner{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
MatchWinnerViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"WinnerViewController"];
vc.modalPresentationStyle = UIModalPresentationFormSheet;
vc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:vc animated:NO completion:nil];
vc.view.superview.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;
vc.view.superview.bounds = CGRectMake(0, 0, 800, 600);
}