mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Set frame height based on safe area
This commit is contained in:
parent
cfd34e2021
commit
2a00a4d6ba
@ -4,6 +4,13 @@ struct PostListBottomBarView: View {
|
||||
@EnvironmentObject var model: WriteFreelyModel
|
||||
@Binding var postCount: Int
|
||||
|
||||
private var frameHeight: CGFloat {
|
||||
var height: CGFloat = 50
|
||||
let bottom = UIApplication.shared.windows.first?.safeAreaInsets.bottom ?? 0
|
||||
height += bottom
|
||||
return height
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
HStack(spacing: 0) {
|
||||
@ -33,7 +40,7 @@ struct PostListBottomBarView: View {
|
||||
.padding()
|
||||
Spacer()
|
||||
}
|
||||
.frame(height: 100)
|
||||
.frame(height: frameHeight)
|
||||
.background(Color(UIColor.systemGray5))
|
||||
.overlay(Divider(), alignment: .top)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user