【问题标题】:White space after moving uitabbar to the top将uitabbar移到顶部后的空白
【发布时间】:2012-01-26 12:06:03
【问题描述】:

我在 UITabBarController 中使用 UINavigationcontroller 并将 UITabBar 移动到顶部。UITabBar 已成功移动,但问题是,标签栏曾经所在的位置大约有 50px 的空白。 有人有解决这个问题的方法吗????

【问题讨论】:

  • 你说的VC是什么意思?
  • UINavigationController 有 UIViewController,其中包含一个 View,它的高度是 480
  • 嗨。你找到解决方案了吗?因为我面临着类似的问题。

标签: iphone objective-c ios xcode


【解决方案1】:

遍历 tabbarcontroller.view 的子视图,直到找到 tabbar 内部视图的容器,然后将该视图的框架设置为比当前高 50 像素。

另外,更好的解决方案是不要尝试以这种方式使用 tabbarcontroller。只需使用独立的 UITabBar 并在点击选项卡时实现您自己的视图交换逻辑。

【讨论】:

    【解决方案2】:

    取消选中矩形中的扩展边。

    【讨论】:

      猜你喜欢
      • 2011-10-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-09
      • 1970-01-01
      相关资源
      最近更新 更多