呈现UIModalPresentationFormSheet,但显示为UIModalPresnetationPageSheet

时间:2012-12-10 01:15:07

标签: objective-c ipad

我一直在谷歌搜索这个问题超过两个小时无济于事。

我尝试做的是将“演练”作为表单呈现在屏幕上。 modalPresentationStyle值在整个层次结构中设置正确,但“演练”显示为页面表。

SYNavigationController只是将-shouldAutoRotate和-supportedInterfaceOrientation转发给topViewController。

有没有人知道为什么会这样?我已经包含了以下代码。

NSString *storyboardName = @"MainStoryboard_iPhone";
if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) storyboardName = @"MainStoryboard_iPad";

UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:storyboardName bundle:nil];

SYNavigationController *walkThrough = [storyBoard instantiateViewControllerWithIdentifier:@"walkthroughNav"];
walkThrough.modalPresentationStyle = UIModalPresentationFormSheet;

WalkThroughViewController *wtvc = (WalkThroughViewController *)walkThrough.topViewController;
wtvc.showSignIn = YES;

[self presentViewController:walkThrough animated:NO completion:nil];

0 个答案:

没有答案