You can use this
extension UIApplication {
static var yourNameByValue: UIEdgeInsets {
let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene
return scene?.windows.first?.safeAreaInsets ?? .zero
}
}
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: