在iOS 5的Swift 5中更改tabBar的高度 [英] Change tabBar height in Swift 5 for IOS 13
本文介绍了在iOS 5的Swift 5中更改tabBar的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将 UITabBar
的高度更改为95.我可以在旧版的iOS Swift中做到这一点.这是我的代码,可以在较旧的版本中使用.
I need to change the UITabBar
height to 95. I can do that in the older version of iOS Swift. This is my code that work in the older version.
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
}
推荐答案
在 viewDidLayoutSubviews
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
tabBar.frame.size.height = 95
tabBar.frame.origin.y = view.frame.height - 95
}
这篇关于在iOS 5的Swift 5中更改tabBar的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文