これでストーリーボードを使用しています。ストーリーボードには、タップ時に別の uiviewcontroller (choosewinner) を呼び出してポップアップするボタンを持つ「メインページ」の uiviewcontroller があります。しかし、この 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);
}