使用 iOS 模拟器,我试图让模式以透明背景显示在父 Controller 上。我将 Controller 定义为:
var controller = new DailyRewardController();
controller.ModalPresentationStyle = UIModalPresentationStyle.CurrentContext;
controller.View.BackgroundColor = UIColor.Clear;
controller.View.Opaque = true;
PresentViewController (controller, true, null);
Controller 最初显示为透明背景,但随着动画结束,屏幕现在变成黑色,如下面的屏幕截图所示。注意:忽略可怕的弹出窗口;这只是一个原型(prototype):-)
这是动画结束后的样子;然而,当动画运行时,它是透明的......知道为什么吗?
最佳答案
完成presentviewcontroller的动画后, Root View Controller 消失,这就是原因。
关于c# - iOS 模态弹出窗口开始透明但变成空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25224365/