I'm having the following code block:
struct StackOverflow: View {
var body: some View {
Text("Hello, World!")
.padding(.bottom,UIApplication.shared.windows.first?.safeAreaInsets.bottom ?? 15)
}
}
However, this returns the following error:
'windows' was deprecated in iOS 15.0: Use UIWindowScene.windows on a relevant window scene instead
I tried to utilize UIWindowScene.windows but it's not working somehow. Any ideas how to translate this into the new syntax?