In one of my controller i use custom toolbar, i want to get height of default toolbar (navigation bar) in ios. I used macro #define NAVBAR_HEIGHT self.navigationController.navigationBar.frame.size.height
.
However, when controller is not embed in navigation stack that macro returns zero.
I dont want to use constants of 44, because it may be different on other Apple device.
For tab bar i use:
+(CGFloat)getTabBarHeight{
UITabBarController *tabBarController = [UITabBarController new];
CGFloat tabBarHeight = tabBarController.tabBar.frame.size.height;
return tabBarHeight;
}
Is there any snippet like that, so i can return value of navigation controller toolbar?