如何将弹出窗口标题栏颜色设置为与默认导航栏相同?

发布于 2024-10-09 23:40:33 字数 203 浏览 16 评论 0原文

我在弹出窗口标题栏上有一些按钮,它们是深色的,所以我想将弹出窗口标题栏颜色更改为与导航栏颜色相同,我该怎么办?您将在弹出窗口中看到灰色标题栏,我该怎么做?

替代文本 替代文字

I have some buttons on popover title bar, they are in dark color, so that I want to the popover title bar color can be changed to the same as Navigation Bar color, what can I do? You will see the gray title bar in popover, how can I do it?

alt text
alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

玻璃人 2024-10-16 23:40:33

我不确定您的代码是什么样的,但从屏幕截图来看,我假设您将 UINavigationController 作为 UIPopoverController 的内容呈现。如果是这种情况,您需要在 UINavigationController 的navigationBar 属性上设置tintColor 或barStyle 属性。

如果这会带来问题,您可能必须将 UINavigationController 嵌套在另一个视图中(我知道这很疯狂)如果它嵌套在白色视图中,则应该使用 UINavigationBar 的默认样式。

I'm not certain what your code looks like, but from the screen shots I assume that you are presenting a UINavigationController as the content of the UIPopoverController. If that is the case you'll need to set the tintColor or barStyle property on the navigationBar property of the UINavigationController.

If this poses problems you may have to nest the UINavigationController within another view (crazy I know) If its nested within a white view, it should use the default style of the UINavigationBar.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文