fix layout issue of ItemView when landscape
This commit is contained in:
parent
0f78534157
commit
443fcc4b66
|
@ -84,7 +84,6 @@ struct ItemLandscapeMainView: View {
|
||||||
// MARK: body
|
// MARK: body
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
|
||||||
ZStack {
|
ZStack {
|
||||||
// MARK: Backdrop
|
// MARK: Backdrop
|
||||||
|
|
||||||
|
@ -93,15 +92,18 @@ struct ItemLandscapeMainView: View {
|
||||||
.opacity(0.3)
|
.opacity(0.3)
|
||||||
.edgesIgnoringSafeArea(.all)
|
.edgesIgnoringSafeArea(.all)
|
||||||
.blur(radius: 4)
|
.blur(radius: 4)
|
||||||
|
.layoutPriority(1)
|
||||||
|
|
||||||
// iPadOS is making the view go all the way to the edge.
|
// iPadOS is making the view go all the way to the edge.
|
||||||
// We have to accomodate this here
|
// We have to accomodate this here
|
||||||
|
Group {
|
||||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||||
innerBody.padding(.horizontal, 25)
|
innerBody.padding(.horizontal, 25)
|
||||||
} else {
|
} else {
|
||||||
innerBody
|
innerBody
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.layoutPriority(2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue