//navigation height
//系统导航栏高度
CGRect rectNav = self.navigationController.navigationBar.frame;
//系统状态栏的高度
CGRect rectStatus = [[UIApplication sharedApplication] statusBarFrame];
//状态栏+导航栏的高度
CGFloat nav_status_height = rectStatus.size.height + rectNav.size.height;
UIEdgeInsets safeAreaInsets = [[UIApplication sharedApplication] keyWindow].safeAreaInsets;
CGFloat bottomBarHeight = safeAreaInsets.bottom;
NSLog(@"底部横条高度:%f", bottomBarHeight);
网友评论