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

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

问题描述

我正在使用应用程序的日夜模式。
问题是,当只是设置视图的背景颜色然后使用它作为呈现为弹出时,几乎没有白色文物(参见图片)



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



解决方案

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


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)

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

解决方案

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天全站免登陆