• <bdo id='v53bk'></bdo><ul id='v53bk'></ul>

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

      3. 在基于导航的应用程序中将背景图像添加到 UITableViewController

        add background image to UITableViewController in Navigation based app(在基于导航的应用程序中将背景图像添加到 UITableViewController)
        1. <tfoot id='BftAj'></tfoot>

            <tbody id='BftAj'></tbody>
            <bdo id='BftAj'></bdo><ul id='BftAj'></ul>

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

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

                <legend id='BftAj'><style id='BftAj'><dir id='BftAj'><q id='BftAj'></q></dir></style></legend>

                  本文介绍了在基于导航的应用程序中将背景图像添加到 UITableViewController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个基于导航的应用程序,我将 UITableViewControllers 推送到堆栈上.我想为我的所有 UITableViewControllers 添加背景 UImage.不是 UIColor,而是 UImage.我知道如何使用 Nib 文件并将 UITableView 本身设置为使用 [UIColor ClearColor],但我没有想要浏览我所有的 UITableViewControllers 并将它们更改为使用 Nib 文件等.

                  I have a navigation based app where I push UITableViewControllers onto the stack. I would like to add a background UImage to all of my UITableViewControllers. Not a UIColor, but an UImage. I know how I can do this using a Nib file and setting the UITableView itself to have use [UIColor ClearColor], but I don't want to go through all my UITableViewControllers and change them to using Nib files, etc.

                  我还发现 这个解决方案 如果我只是在我的应用程序中使用单个 tableviewcontroller,那就太好了.我认为可能有一种方法可以通过在 UITableViewController 中默认创建的表视图下方"添加子视图来完成这项工作?

                  I also found this solution which would be great if I was just using a single tableviewcontroller in my app. I think there might be a way to make this work, by adding a subview "below" my table view that is created by default in a UITableViewController?

                  任何建议都会很棒.

                  推荐答案

                  在基于导航的应用程序中有点不同:只需更改每个表格视图所在的导航视图的背景.在每个 UITableViewController 的 viewDidLoad 中放置以下代码即可:

                  It's a little different in a navigation based app: just change the background of the navigation view that each table view is sitting on. Placing the following code in viewDidLoad of each UITableViewController works:

                  self.navigationController.view.backgroundColor = 
                  [UIColor colorWithPatternImage:[UIImage imageNamed:@"myImage.png"]];
                  self.tableView.backgroundColor = [UIColor clearColor];
                  

                  但是您可能只需要在导航控制器的顶层执行一次,而不是在每个 tableview 控制器中执行一次(尽管您仍然必须将每个背景设置为清除).

                  But you may only need to do it once, at the top level of the navigation controller, rather than in each tableview controller (although you'll still have to set each background to clear).

                  这篇关于在基于导航的应用程序中将背景图像添加到 UITableViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 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设置灯光状态栏文字颜色的正确方法)
                  Show UITabBar when UIViewController pushed(推送 UIViewController 时显示 UITabBar)
                • <small id='sukUO'></small><noframes id='sukUO'>

                        • <bdo id='sukUO'></bdo><ul id='sukUO'></ul>

                              <tbody id='sukUO'></tbody>
                            <legend id='sukUO'><style id='sukUO'><dir id='sukUO'><q id='sukUO'></q></dir></style></legend>

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