calculating height of UITabBar

If the view controller has an ancestor that is a tab bar controller, you can retrieve the height from that tab bar.

CGFloat tabBarHeight = self.tabBarController.tabBar.frame.size.height;

It is 320 x 49.

If you want to test, open Interface Builder, add a UITabBar, go into the ruler, you will see it

UITabBar is inherited from UIVIew so you can use the frame.size.height to get the height


In Swift:

let height = self.tabBarController?.tabBar.frame.height ?? 49.0

Relying on the actual height of the tab-bar, and using the magic number as a fallback.