//状态栏高度
CGRect statusbar_frame =[[UIApplication sharedApplication]statusBarFrame];
CGFloat statusbar_height = statusbar_frame.size.height;
//导航栏高度
CGFloat navi_height = statusbar_height + self.navigationController.navigationBar.frame.size.height;
//tabbar高度(不包括底部安全区域高度:iPhone X:34)
//如果在tabBarController中使用(或者你继承自UITabBarController的VC)
CGFloat tabBar_Height = self.tabBar.frame.size.height;
//在非tabBarController中使用
UITabBarController *tabBarVc =[[UITabBarController alloc] init];
CGFloat tabBar_Height = tabBarVc.tabBar.frame.size.height;