分页视图控制器的导航栏在标签栏控制器内部较暗 [英] Navigation bar for split view controller is darker when inside a tab bar controller

查看:133
本文介绍了分页视图控制器的导航栏在标签栏控制器内部较暗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果将拆分视图控制器放在标签栏控制器中,左侧的导航栏和标签栏会变暗。我附上了截图。我通过创建一个Master-Detail应用程序然后添加一个标签栏控制器来创建它。你如何解决这个问题?

If you place a split view controller inside a tab bar controller the navigation bar and tab bar are darker on the left side. I've attached a screenshot. I created this by creating a Master-Detail Application and then adding a tab bar controller. How do you correct this issue?

< img src =https://i.stack.imgur.com/b3xvL.pngalt =在此处输入图像说明>

推荐答案

在撰写本文时(2017年5月),此错误仍然存​​在。我不敢相信苹果不会照顾这个。更糟糕的是,如果您旋转设备,从侧面打开主设备并向后旋转,半透明条切换到位,突然主设备有一个工作半透明条,细节没有。 :/

At the time of writing (May 2017) this bug still exists. I can't believe Apple doesn't take care of this. The worse part is that if you rotate your device, open the master from the side and rotate back, the translucent bars switch place and suddenly the master has a working translucent bar and the detail has not. :/

我唯一可能解决的问题是摆脱UITabBarController,而是使用普通的UIViewController构建我自己的标签栏控制器实现底部有一个UITabBar和UIViewController包含API。

The only possible fix I was able to come up with, was to get rid of UITabBarController and instead build my own implementation of a tab bar controller using a plain UIViewController with a UITabBar at the bottom and the UIViewController containment API.

这意味着要重新发明轮子的大量编码。很遗憾没有使用UITabBarController,但事实就是如此。你必须在容器控制器和它的所有漂亮功能之间进行权衡,例如免费获得的更多控制器与半透明条形码。

This means a lot of coding to reinvent the wheel. Its sad to not make use of UITabBarController but thats how it is. You have to make a trade off between the container controller and all its nice features like the "More" controller you get for free vs having translucent bars.

如果你能活下去没有半透明的酒吧,我仍然会去UITabBarController做所有的编码。另一方面,可以使用UICollectionView替换UITabBar,并且不需要更多控制器就可以拥有超过6个项目。

If you can live without translucent bars, I'd still go for UITabBarController over do all the coding. On the other hand, one could replace the UITabBar with a UICollectionView and have more than 6 items without having the need for a "More" controller at all.

这篇关于分页视图控制器的导航栏在标签栏控制器内部较暗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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