let statusHeight:CGFloat = {
if #available(iOS 13.0, *) {
let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene
let frame = scene?.statusBarManager?.statusBarFrame
return frame?.height ?? 0
} else {
return UIApplication.shared.statusBarFrame.size.height
}
}()
IOS13以后获取状态栏高度 statusHeight
最新推荐文章于 2023-07-07 15:28:11 发布