gpt4 book ai didi

ios - 将 UITabBar 放置在 swift 的顶部

转载 作者:行者123 更新时间:2023-11-30 12:42:14 24 4
gpt4 key购买 nike

是否可以将 UITabBar 快速定位在顶部以及如何实现?我无法将 UITabBar 放置在 View 的顶部。

最佳答案

您可以做的是隐藏屏幕顶部的选项卡栏和自定义 View 。

很难给你完整的代码,但我会尽力帮助你解决你的情况。

1)隐藏您拥有的标签栏

2) 使用此示例创建客户 tar http://blog.adambardon.com/how-to-create-custom-tab-bar-in-swift-part-1/

3) 将 subview 添加到 tabbarcontrollerview 并指定框架 x = 0 、 y = 0 、宽度 = screenwidth 和 height = 69

希望这对您有帮助

关于ios - 将 UITabBar 放置在 swift 的顶部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42097256/

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