BDPStatusBarHeightManager.h
1.03 KB
//
// BDPStatusBarHeightManager.h
// BBAUIKit
//
// Created by Liu,Xianting on 2020/9/16.
// Copyright © 2020 Baidu. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
/// 导航栏高度管理
/// 场景1: 状态栏没有隐藏,直接返回高度
/// 场景2:如果状态是隐藏状态,则先展示状态栏,后隐藏(无动画形式)
/// 场景3:iPhoneX 横屏为 0 横屏不允许展示statusBar, 即使设置NO,也不会展示,高度返回0
/// 场景4:蓝色导航条场景,UIWindow: frame = (0 0; 375 667) vc.view: frame = (0 20; 375 647)
/// 如果这里返回40 加上系统自动减去的20,则会偏移60,所以+[BDPStatusBarHeightManager statusBarHeight]依旧返回20
@interface BDPStatusBarHeightManager : NSObject
/// statusBar高度, 线程安全
+ (CGFloat)statusBarHeight;
/// 打电话、导航、热点时,导航栏高度变高,判断是否是这种状态, 线程安全
+ (BOOL)isStatusBarDoubleHeightBlueBar;
@end
NS_ASSUME_NONNULL_END