How to set the height of tabbar gracefully?

when customizing navbar and tabbar, we all need to set their heights ourselves.
this is how I set the current navbar heights

CGFloat navbarHeight = CGRectGetHeight([UIApplication sharedApplication].statusBarFrame) + 44;

but for the height of this tabbar, there seems to be no place to get the relevant values directly? Only according to the device information, the screen size knows whether it is the bangs screen, and then set it to 49or83? Then I came up with a plan

CGFloat tabbarHeight = CGRectGetHeight([UIApplication sharedApplication].statusBarFrame) > 20 ? 83:49;
Is there a more elegant way to get it directly? At present, these numbers 20, 44, 83, 49 are all written based on known results

.
Ios
Jul.08,2021
Menu