gpt4 book ai didi

ios - 如何为 UIPopover View 设置 clearColor?

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:19:55 24 4
gpt4 key购买 nike

我需要将 UIPopover 背景颜色设置为 clearColor。但是其余所有颜色都可以使用以下代码正常工作:

myPopover.backgroundColor = [UIColor greenColor];

但是当我设置 clearColor 时,背景是白色而不是透明的。谁能帮我。提前致谢!

最佳答案

如果您谈论的是 UIPopoverController,请尝试将背景颜色设置为其内容 View Controller 的 View 。

myPopover.contentViewController.view.backgroundColor = [UIColor clearColor];

另外,检查 this SO post关于自定义弹出框背景。

关于ios - 如何为 UIPopover View 设置 clearColor?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26481839/

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