小编Fab*_*uto的帖子

在 Swift 5 中为 IOS 13 更改 tabBar 高度

我需要将UITabBar高度更改为 95。我可以在旧版本的 iOS Swift 中做到这一点。这是我在旧版本中工作的代码。

override func viewWillLayoutSubviews() {
    super.viewWillLayoutSubviews()

    tabBar.frame.size.height = 95
    tabBar.frame.origin.y = view.frame.height - 95

    menuButton.frame.origin.y = self.view.bounds.height - tabBar.frame.size.height - 10
    shadowBtn.frame.origin.y = self.view.bounds.height - tabBar.frame.size.height - 15
}
Run Code Online (Sandbox Code Playgroud)

uitabbarcontroller ios swift swift5 ios13

4
推荐指数
1
解决办法
3415
查看次数

标签 统计

ios ×1

ios13 ×1

swift ×1

swift5 ×1

uitabbarcontroller ×1