Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone UIModalPresentationFullScreen-过渡动画背后的背景色_Iphone_Objective C_Cocoa Touch_Modalviewcontroller - Fatal编程技术网

Iphone UIModalPresentationFullScreen-过渡动画背后的背景色

Iphone UIModalPresentationFullScreen-过渡动画背后的背景色,iphone,objective-c,cocoa-touch,modalviewcontroller,Iphone,Objective C,Cocoa Touch,Modalviewcontroller,我目前正在构建一个通用应用程序 用户点击一个按钮后,我以以下方式在模式视图中显示一些设置: viewCtrl.modalPresentationStyle = UIModalPresentationFullScreen; viewCtrl.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:viewCtrl animated:YES]; 在iPhone和iPa

我目前正在构建一个通用应用程序

用户点击一个按钮后,我以以下方式在模式视图中显示一些设置:

viewCtrl.modalPresentationStyle = UIModalPresentationFullScreen;
viewCtrl.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:viewCtrl animated:YES];
在iPhone和iPad上,两种过渡风格看起来都一样。现在的问题是,在iPad上,倾斜的背景是白色的。这个白色背景看起来很难看。 在iPhone上,它是黑色的,正如人们所认为的那样

我还尝试将黑色背景视图添加到我的[UIApplication window]

UIView *bgView = [[UIView alloc] init];
[bgView setBackgroundColor:[UIColor blackColor]];
[window addSubview:bgView];

但这没有什么区别。

我认为这就像将UIWindow背景色设置为黑色一样简单。例如,如果您在IB中打开MainWindow.xib,您应该能够在那里设置背景-或者在AppDelegate中您应该能够设置UIWindow的背景。

我认为这与将UIWindow背景颜色设置为黑色一样简单。例如,如果您在IB中打开MainWindow.xib,您应该可以在那里设置背景,或者在AppDelegate中您应该可以设置UIWindow的背景。

谢谢,在我所有的选项中,我忽略了最简单的一个:D谢谢,在我所有的选项中,我忽略了最简单的一个:D