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

      1. <tfoot id='iEWrL'></tfoot>
      2. <small id='iEWrL'></small><noframes id='iEWrL'>

        在导航栏中为嵌入式 UISearchbar 设置色调颜色

        Setting tint color for embedded UISearchbar in Navigation bar(在导航栏中为嵌入式 UISearchbar 设置色调颜色)
          <tfoot id='6SJhp'></tfoot>

              <tbody id='6SJhp'></tbody>

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

                  <small id='6SJhp'></small><noframes id='6SJhp'>

                • 本文介绍了在导航栏中为嵌入式 UISearchbar 设置色调颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个应用程序,整个 UI 都带有蓝色主题.我在初始视图的导航栏中也有一个嵌入式搜索栏.我的应用程序按钮文本颜色为白色,并在应用程序委托中声明:

                  I have an app that has a blue tint theme to the entire UI. I also have an embedded search bar in the Navigation Bar on my initial view. My button text color for the app is white and declare that in the app delegate using:

                      [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
                  

                  问题是这会导致嵌入式搜索栏在选择光标时隐藏光标,因为白色色调会影响搜索栏.我尝试使用两种方法专门将搜索栏的色调设置为 [UIColor blueColor],但没有运气.我尝试引用 UISearch 栏的两种方法是:

                  Problem is that this causes the embedded search bar to hide the cursor when it is selected because of the white tint affecting the search bar. I have tried to specifically set the tint of the search bar to [UIColor blueColor] using two methods but have had no luck. The two ways I have tried to refrence the UISearch bar are:

                      [self.navigationController.searchDisplayController.searchBar setTintColor:[UIColor blueColor]];
                  

                      [searchBar setTintColor:[UIColor blueColor]]
                  

                  应该正确引用searchBar.

                  The searchBar should be referenced properly.

                  我对这些网点所做的一切都不会影响嵌入式搜索栏.

                  Nothing I do to these outlets affect the embedded search bar at all.

                  推荐答案

                  遇到了同样的问题.将搜索栏嵌入导航栏后使用此代码解决.

                  Had the same problem. Solved it by using this code after embedding the search bar into navigation bar.

                      self.navigationItem.titleView.tintColor = [UIColor blueColor];
                  

                  可能不是最好的解决方案,但它确实有效.

                  Probably not the best solution, but it works.

                  这篇关于在导航栏中为嵌入式 UISearchbar 设置色调颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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(如何在代码中以编程方式添加导航控制器,但不作为初始视图控制器)
                  The correct way to set a light status bar text color in iOS 7 based on different ViewControllers(iOS 7中基于不同ViewControllers设置灯光状态栏文字颜色的正确方法)
                  View being blocked by UITransitionView after being presented(呈现后被 UITransitionView 阻止的视图)

                • <tfoot id='7xBIU'></tfoot>

                          <small id='7xBIU'></small><noframes id='7xBIU'>

                          <legend id='7xBIU'><style id='7xBIU'><dir id='7xBIU'><q id='7xBIU'></q></dir></style></legend>
                            <tbody id='7xBIU'></tbody>

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