如何完全着色 UIPopoverPresentationController 背景颜色? [英] How to completely colorize UIPopoverPresentationController background color?

查看:20
本文介绍了如何完全着色 UIPopoverPresentationController 背景颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为某个应用使用昼夜模式.问题是,当只设置视图的背景颜色然后将其用作呈现为弹出框"时,几乎没有白色伪影(见图)

I'm working with a Day and Night Mode for an app. The problem is, when just setting the background color of a view AND THEN using it as "presenting as popover" there are little white artifacts (see the picture)

有没有简单的方法来解决这个问题?我可能需要编写自己的 UIView 吗?

Is there an easy way to fix this? Do I may have to write my own UIView?

推荐答案

您可以设置 UIPopoverPresentationController 的 backgroundColor.如果这还不够,您将必须自定义弹出窗口的 UIPopoverBackgroundView.这使您可以控制整个弹出框背景,包括小三角形.

You can set the UIPopoverPresentationController's backgroundColor. If that isn't sufficient, you will have to customize your popover's UIPopoverBackgroundView. This gives you control of the entire popover background, including the little triangle.

这篇关于如何完全着色 UIPopoverPresentationController 背景颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆