I have the following class that I use in order to find the height of a tabBar at the bottom of my screen:
import UIKit
class TabsController: UITabBarController
{
internal static var tabBarHeight: CGFloat = 0
override func viewDidLayoutSubviews()
{
TabsController.tabBarHeight = self.view.frame.height
print(TabsController.tabBarHeight)
}
}
The only reason I have the class is so that I can access the tabBarHeight
variable.
I created the class after seeing this post.
For some reason, the print statement displays 667.0 instead of a correct value. How do I get the correct tabbar height?