var statusBarHeight = 0.0
if #available(iOS 13.0, *){
let statusBarManager:UIStatusBarManager = UIApplication.shared.windows.first!.windowScene!.statusBarManager!
statusBarHeight = Double(Int(statusBarManager.statusBarFrame.size.height));
}
else {
statusBarHeight = Double(UIApplication.shared.statusBarFrame.size.height);
}
网友评论