‘windows’ was deprecated in iOS 15.0: Use UIWindowScene.windows on a relevant window scene instead
Thank you for reading this post, don't forget to subscribe!windows の代わりに UIWindowScene.windows を使う
first が2回続くので要注意
iOS15 以前
UIApplication.shared.windows.first?.safeAreaInsets.bottom
iOS15 以降
(UIApplication.shared.connectedScenes.first as? UIWindowScene)?.windows.first?.safeAreaInsets.bottom