UITabBar functionality without UITabBarController(没有 UITabBarController 的 UITabBar 功能)
问题描述
我有这个问题,我有一个基于导航的应用程序,并且在其中一个详细视图上我需要有 UITabBar,它将显示一些 UITableViews.由于苹果文档说你永远不应该将标签栏控制器添加到导航控制器",这会造成很大的问题,我找到了这个示例:链接文本,它正在工作,但是在选择一个表格视图后,UITabBar 消失了.
I have this problem, I've got a navigation-based application, and on the one of the detail view i need to have UITabBar, which will display some UITableViews. Since apple documentation says "you should never add a tab bar controller to a navigation controller" it make quite a problem, i've found this sample: link text, it's working, but after picking one of the table view, the UITabBar disappears.
推荐答案
既然您没有使用 TabBarController 来显示表视图(如链接中所述),您是否确保表视图或您的任何其他视图在点击选项卡时添加的大小是否正确?
Now that you are not using a TabBarController for showing the tableviews (as mentioned in the link), have you made sure that the table views or any other views you are adding when a tab is tapped are correct size?
您正在添加子视图或将其置于顶部,因此表格视图可能会覆盖您的标签栏.
You are adding a subview or bringing it to top so the table view is probably covering your tab bar.
这篇关于没有 UITabBarController 的 UITabBar 功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:没有 UITabBarController 的 UITabBar 功能


基础教程推荐
- Android文本颜色不会改变颜色 2022-01-01
- LocationClient 与 LocationManager 2022-01-01
- 如何使用 YouTube API V3? 2022-01-01
- 使用 Ryzen 处理器同时运行 WSL2 和 Android Studio 2022-01-01
- :hover 状态不会在 iOS 上结束 2022-01-01
- 如何使 UINavigationBar 背景透明? 2022-01-01
- 固定小数的Android Money Input 2022-01-01
- Android ViewPager:在 ViewPager 中更新屏幕外但缓存的片段 2022-01-01
- 在 iOS 上默认是 char 签名还是 unsigned? 2022-01-01
- “让"到底是怎么回事?关键字在 Swift 中的作用? 2022-01-01