【发布时间】:2020-03-13 10:38:06
【问题描述】:
我正在尝试在视图出现时从底部边缘过渡到顶部。
ZStack{
VStack {
.
.//other components
.
if self.modalShown {
HStack {
GeometryReader { geometry in
BottomSheetView(
isOpen: self.$modalShown,
maxHeight: geometry.size.height * 0.6
) {
ZStack(alignment: .bottom) {
FiltersView(hideControl: self.$modalShown)
.transition(.move(edge: .bottom))
}
.edgesIgnoringSafeArea(.bottom)
}
}
}
.accessibility(identifier: "modalFilterView")
}
}
问题是当这个视图出现时,它执行了一种 alpha 0 到 alpha 1 的转换。当视图被关闭时,它不会执行任何转换。
可以将这种不良行为与 zIndex 相关联吗?
【问题讨论】: