gpt4 book ai didi

ios - UIPageControl 具有未指定的灰色背景色

转载 作者:行者123 更新时间:2023-11-28 14:20:20 27 4
gpt4 key购买 nike

我在 UIViewController 上有一个 UIPageControl,但是尽管尝试更改属性检查器中的背景颜色,它仍然是这种深灰色,不会在界面构建器中显示。

如下图所示:

Screenshot showing comparison between the simulator and interface builder.

关于如何解决这个问题的任何想法? - 理想情况下我想要一个透明的背景,但我只是应用了黄色来比较清楚。

最佳答案

可以通过UIAppearance 协议(protocol)更改UIPageControl 的背景颜色。

Apple Docs

You can customize the appearance of instances of a class by sending appearance modification messages to the class’s appearance proxy.

示例

UIPageControl.appearance().backgroundColor = .darkGray

解决方案

确保您没有电话来更改它。

关于ios - UIPageControl 具有未指定的灰色背景色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51965001/

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