<tfoot id='kFz93'></tfoot>
    • <bdo id='kFz93'></bdo><ul id='kFz93'></ul>

  1. <small id='kFz93'></small><noframes id='kFz93'>

    <legend id='kFz93'><style id='kFz93'><dir id='kFz93'><q id='kFz93'></q></dir></style></legend>
  2. <i id='kFz93'><tr id='kFz93'><dt id='kFz93'><q id='kFz93'><span id='kFz93'><b id='kFz93'><form id='kFz93'><ins id='kFz93'></ins><ul id='kFz93'></ul><sub id='kFz93'></sub></form><legend id='kFz93'></legend><bdo id='kFz93'><pre id='kFz93'><center id='kFz93'></center></pre></bdo></b><th id='kFz93'></th></span></q></dt></tr></i><div id='kFz93'><tfoot id='kFz93'></tfoot><dl id='kFz93'><fieldset id='kFz93'></fieldset></dl></div>

    1. iOS 8 - 设置状态栏颜色(当你的 UINavigationBar 有一个零背景图像时)

      iOS 8 - Set Status Bar Color (when your UINavigationBar has a nil backgroud image)(iOS 8 - 设置状态栏颜色(当你的 UINavigationBar 有一个零背景图像时))
        <tfoot id='uCKQ4'></tfoot>
        <legend id='uCKQ4'><style id='uCKQ4'><dir id='uCKQ4'><q id='uCKQ4'></q></dir></style></legend>

        <small id='uCKQ4'></small><noframes id='uCKQ4'>

            <bdo id='uCKQ4'></bdo><ul id='uCKQ4'></ul>
                <tbody id='uCKQ4'></tbody>
            • <i id='uCKQ4'><tr id='uCKQ4'><dt id='uCKQ4'><q id='uCKQ4'><span id='uCKQ4'><b id='uCKQ4'><form id='uCKQ4'><ins id='uCKQ4'></ins><ul id='uCKQ4'></ul><sub id='uCKQ4'></sub></form><legend id='uCKQ4'></legend><bdo id='uCKQ4'><pre id='uCKQ4'><center id='uCKQ4'></center></pre></bdo></b><th id='uCKQ4'></th></span></q></dt></tr></i><div id='uCKQ4'><tfoot id='uCKQ4'></tfoot><dl id='uCKQ4'><fieldset id='uCKQ4'></fieldset></dl></div>

                本文介绍了iOS 8 - 设置状态栏颜色(当你的 UINavigationBar 有一个零背景图像时)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我在我的应用程序(特别是 ICViewPager)中使用了视图寻呼机.要使 View Pager 像这样融入导航栏:

                I am using a view pager in my app (specifically ICViewPager). To make the View Pager blend into the Navigation bar like so:

                我必须将这些代码行放入我的 AppDelegate.m

                I had to put these lines of code in my AppDelegate.m

                [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
                [[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
                

                但是,这会导致状态栏与我的导航栏颜色不同.

                However, this causes the status bar not to be the same color as my navigation bar.

                如何将状态栏的颜色设置为与导航栏的颜色相同?

                How do I set the color of my status bar to be the same as my navigation bar?

                推荐答案

                如何将状态栏的颜色设置为与导航栏的颜色相同?

                How do I set the color of my status bar to be the same as my navigation bar?

                你没有.状态栏没有颜色.它是透明的.您的工作是让一些具有所需颜色的视图延伸到视图顶部,在状态栏的后面,以便该颜色显示出来.

                You don't. The status bar has no color. It is transparent. It is your job to make some view that has the desired color extend up to the top of the view, behind the status bar, so that that color shows through.

                例如,此视图可以是您的窗口,也可以是视图控制器的主视图.现在,它是白色的,所以我们看到导航栏顶部上方显示了白色.如果你给你的窗口(或主视图,或者我们看到的任何白色的东西)提供与导航栏相同的颜色,你就会得到你想要的效果.

                This view could be your window, for example, or the view controller's main view. Right now, it is white, and so we see the white color show through above the top of the navigation bar. If you give your window (or main view, or whatever the white thing is that we are seeing) the same color as the navigation bar, you'll get the effect you want.

                或者,您可以调整导航栏本身的大小和位置,使其到达窗口顶部并覆盖它.

                Alternatively, you could adjust the size and position of the navigation bar itself so that it reaches to the top of the window and covers it.

                这篇关于iOS 8 - 设置状态栏颜色(当你的 UINavigationBar 有一个零背景图像时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                UINavigationController inside a UITabBarController inside a UISplitViewController presented modally on iPhone(UISplitViewController 内的 UITabBarController 内的 UINavigationController 以模态方式呈现在 iPhone 上) - IT屋-程序员软件开发技术分
                ViewController in UINavigationController orientation change(UINavigationController 中的 ViewController 方向更改)
                Custom back button in UINavigationController(UINavigationController 中的自定义后退按钮)
                How to add a navigation controller programmatically in code but not as initial view controller(如何在代码中以编程方式添加导航控制器,但不作为初始视图控制器)
                How to get the previous viewcontroller that pushed my current view(如何获取推送我当前视图的上一个视图控制器)
                The correct way to set a light status bar text color in iOS 7 based on different ViewControllers(iOS 7中基于不同ViewControllers设置灯光状态栏文字颜色的正确方法)
                1. <small id='6eOYi'></small><noframes id='6eOYi'>

                      <tbody id='6eOYi'></tbody>
                    • <legend id='6eOYi'><style id='6eOYi'><dir id='6eOYi'><q id='6eOYi'></q></dir></style></legend>
                    • <tfoot id='6eOYi'></tfoot>
                        <i id='6eOYi'><tr id='6eOYi'><dt id='6eOYi'><q id='6eOYi'><span id='6eOYi'><b id='6eOYi'><form id='6eOYi'><ins id='6eOYi'></ins><ul id='6eOYi'></ul><sub id='6eOYi'></sub></form><legend id='6eOYi'></legend><bdo id='6eOYi'><pre id='6eOYi'><center id='6eOYi'></center></pre></bdo></b><th id='6eOYi'></th></span></q></dt></tr></i><div id='6eOYi'><tfoot id='6eOYi'></tfoot><dl id='6eOYi'><fieldset id='6eOYi'></fieldset></dl></div>
                          <bdo id='6eOYi'></bdo><ul id='6eOYi'></ul>