带有 UITabbar 的 UISplitView [英] UISplitView with UITabbar

查看:28
本文介绍了带有 UITabbar 的 UISplitView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题,我似乎无法修复.我目前正在将我的应用程序更新到 iOS7.这一切都适用于 iOS6.它是一个通用应用程序,因此使用相同的 xib 文件.然而,iPad 在某些情况下使用 UISplitViews.就像我说的,这一切都适用于 iOS6 哦,这一切也适用于 iPhone.

I have a strange one that I can not seem to fix. I am currently working on updating my app to iOS7. This all worked in iOS6. It is an universal app and thus uses same xib files. However the iPad uses UISplitViews on some. Like I said, this all worked in iOS6 oh this all works on the iPhone too.

问题是底部的灰色条.我将标签栏更改为不透明以正确向上移动视图,因为我将一些 UI 剪辑到视图底部,并且位于标签栏下方,在那里偏离.但是,如果我将其重新设置为半透明条,它会在下方但正确拉伸.如果我不这样做,它会增加一个酒吧.不使用 splitview 时,其他选项卡工作正常.

The problem is a grey bar at the bottom. I changed the tab bar to be opaque to move views up properly as i had some UI clipped to bottom of views and that went underneath the tab bar, sidetracked there. But if i set it back to translucent bar, it goes underneath but stretched properly. if i dont, it adds a bar. Other tabs work fine when NOT using splitview.

UISplitviewController 以编程方式添加.

The UISplitviewController is added programmatically.

请参阅附加图片以获得更好的描述.

See attached image for better description.

这个我试过了:

  • 在拆分视图上添加了自动调整大小
  • 检查 xib 以获取 splitviews 中的子视图以自动调整大小
  • 试图强制 splitview 成为屏幕边界
  • 将剪辑移除到所有视图的边界
  • 移除了自动调整子视图大小

欢迎提出任何想法.

谢谢大家.

更新:

设置 uisplitview 的背景颜色,它确实将栏着色为黑色.所以 uisplitview 肯定会延伸到它.

setting the background colour the uisplitview, it does colour the bar black. So the uisplitview is definitely stretching to it.

推荐答案

我子类化 UISplitViewController 并将下面的行添加到 viewDidLoad 并修复了灰线.

I subclassed UISplitViewController and added the line below to viewDidLoad and that fixed the grey line.

self.extendedLayoutIncludesOpaqueBars = YES;

这篇关于带有 UITabbar 的 UISplitView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆