<bdo id='lYnd5'></bdo><ul id='lYnd5'></ul>

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

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

      UITableView 被 UITabBar 部分隐藏

      时间:2023-06-13
    1. <tfoot id='PZCV5'></tfoot>
      <legend id='PZCV5'><style id='PZCV5'><dir id='PZCV5'><q id='PZCV5'></q></dir></style></legend>

    2. <small id='PZCV5'></small><noframes id='PZCV5'>

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

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

                本文介绍了UITableView 被 UITabBar 部分隐藏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个 UITabBarController,其中包含一个 UINavigationController.在可见的 UIViewController 中,我以编程方式创建了一个 UITableView,如下所示:

                I've got a UITabBarController which contains a UINavigationController. Within the visible UIViewController, I'm creating a UITableView programatically as follows:

                self.voucherTableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStylePlain];
                self.voucherTableView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
                

                但是,UITabBar 与 UITableView 重叠.

                However, the UITabBar is overlapping the UITableView.

                当我输出 [[UIScreen mainScreen] applicationFrame] 的高度时,它返回 460.00 而应该是 367.00.

                When I output the height of the [[UIScreen mainScreen] applicationFrame], it returns 460.00 whereas it should be 367.00.

                在 Interface Builder 中,我使用模拟指标",它会自动将视图的高度设置为 367.00.

                In Interface Builder, I'm using the 'Simulated Metrics' which automatically sets the height of the view to 367.00.

                我是否缺少某些东西,无论我尝试什么,我都看不到我需要的 367.00 高度.

                Is there something I'm missing, no matter what I try I can't see to get the 367.00 height that I need.

                作为临时修复,我手动设置了 UITableView 的框架,这并不理想,所以最好弄清楚为什么这不起作用:

                As a temp fix, I've set the frame of the UITableView manually, this isn't really ideal so it would be nice to work out why this isn't working:

                self.voucherTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 367) style:UITableViewStylePlain];
                

                推荐答案

                你应该使用 self.view.bounds 而不是 [[UIScreen mainScreen] applicationFrame] 因为最后一个返回整个屏幕框架,而 self.view.bounds为您提供您正在搜索的视图范围.

                You should use self.view.bounds rather than [[UIScreen mainScreen] applicationFrame] as the last one returns you the whole screen frame while self.view.bounds provides you with your view bounds wich seems what you are searching for.

                这篇关于UITableView 被 UITabBar 部分隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:在 UINavigationController 上创建返回箭头形状的 leftBarButtonItem 下一篇:以编程方式设置提示时,UINavigationBar 与 UITableView 重叠

                相关文章

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

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

                1. <legend id='uzZJw'><style id='uzZJw'><dir id='uzZJw'><q id='uzZJw'></q></dir></style></legend>

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