在滑出菜单中更改状态栏颜色 [英] Change status bar colour in slide out menu

查看:81
本文介绍了在滑出菜单中更改状态栏颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个滑出菜单,无论尝试什么,都无法更改状态栏区域的颜色.我不知道怎么了.

I have a slide out menu and no matter what I try, I can't get the status bar area colour to change. I don't know what's wrong.

图片1:

图片2:

图1显示了菜单退出的应用程序.图2显示了情节提要布局如何

Picture 1 shows the app with the menu out. Picture 2 shows how the storyboard layout

我本以为这很简单,因为我已经使用UINavigationBar的外观更改了全局状态栏的颜色

I would have thought this would be simple as I've changed the global status bar colour using UINavigationBar appearance

有人知道我在做什么错吗?

Does anyone know what I'm doing wrong?

推荐答案

对于使用SASlideMenu并想知道如何执行此操作的任何人.修复很简单,只需将一个视图添加到涵盖状态栏区域的幻灯片菜单根视图控制器"即可.当您更改此视图的背景颜色时,它将为菜单上的状态栏区域着色.

For anyone that's using SASlideMenu and wondering how to do this. The fix is simple, just add a view to Slide Menu Root View Controller that covers the status bar area. When you change the background colour of this view, it colours the status bar area on the menu.

这篇关于在滑出菜单中更改状态栏颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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