• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

分页视图控制器的导航栏在标签栏控制器内部较暗

用户头像
it1352
帮助1

问题说明

如果将拆分视图控制器放在标签栏控制器中,左侧的导航栏和标签栏会变暗。我附上了截图。我通过创建一个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 =在此处输入图像说明>

正确答案

#1

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.

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcfhgck
系列文章
更多 icon
同类精品
更多 icon
继续加载