gpt4 book ai didi

c# - iOS 模态弹出窗口开始透明但变成空白

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:04:22 25 4
gpt4 key购买 nike

使用 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):-)

enter image description here

这是动画结束后的样子;然而,随着动画的运行,它是透明的……知道为什么吗?

最佳答案

完成 presentviewcontroller 的动画后, Root View Controller 消失,这就是原因。

关于c# - iOS 模态弹出窗口开始透明但变成空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25224365/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com