gpt4 book ai didi

ios - 向所有 View 可见的 iOS 应用程序添加顶部栏

转载 作者:行者123 更新时间:2023-11-29 02:25:48 25 4
gpt4 key购买 nike

在选项卡栏 iOS 应用程序中添加顶部栏( View )的最佳方法是什么,该顶部栏始终保留在所有 View 的顶部,无论选择哪个选项卡(如下图所示)?

enter image description here

最佳答案

我会使用 UIViewControllerContainment。看看

https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomContainerViewControllers/CreatingCustomContainerViewControllers.html

我设置它的方式是有一个 UIViewController,它有两个 ContainerView。一个 ContainerView 将在其中包含 UITabBarController,另一个将在顶部栏中包含 UIViewController。

这是我在 UIStoryboard 中所做的 enter image description here

关于ios - 向所有 View 可见的 iOS 应用程序添加顶部栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27553579/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com