Don't allow the Placeholder Screen layout to be influenced by the keyboard (#2034)

This commit is contained in:
Doug
2023-11-07 10:16:02 +00:00
committed by GitHub
parent 6adedaf267
commit 344fed4ee6
2 changed files with 3 additions and 1 deletions
@@ -42,7 +42,8 @@ struct PlaceholderScreen: View {
}
.background()
.environment(\.backgroundStyle, AnyShapeStyle(Color.compound.bgCanvasDefault))
.ignoresSafeArea(edges: .top)
.ignoresSafeArea(edges: .top) // Remain vertically centred even if there's a navigation bar.
.ignoresSafeArea(.keyboard) // Specifically for the lock screen, but make sense everywhere.
}
}
+1
View File
@@ -0,0 +1 @@
Don't allow the Placeholder Screen layout to be influenced by the keyboard.