Post

Replies

Boosts

Views

Activity

Reply to How can I get the safeAreaInsets in iOS 15?
I just had this problem and solved it by changing: UIApplication.shared.windows.first(where: { $0.isKeyWindow })?.safeAreaInsets ?? .zero to UIApplication.shared.connectedScenes.filter({$0.activationState == .foregroundActive}).map({$0 as? UIWindowScene}).compactMap({$0}).first?.windows.filter({$0.isKeyWindow}).first?.safeAreaInsets ?? .zero Maybe that will help somebody down the line...
Mar ’22