使用UITabbar的UISplitView [英] UISplitView with UITabbar

查看:135
本文介绍了使用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.

我试过:


  • 在splitview上添加自动调整大小

  • 检查xib以查看拆分视图中的子视图以自动调整大小

  • 尝试将splitview强制为屏幕边界

  • 删除了所有视图中绑定的剪辑

  • 删除了自动调整大小的子视图

  • Added autoresize on splitview
  • Checked xib for subviews in the splitviews to have auto resize
  • Tried to force splitview to be screen bounds
  • Removed clips to bounds on all views
  • Removed autoresize subviews

任何想法都会受到欢迎。

Any ideas would be welcomed.

谢谢大家。

更新:

将背景颜色设置为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天全站免登陆