Closed QuaRang1225 closed 2 months ago
GeometryReader{ proxy in
let minY = proxy.frame(in: .global).minY
Color.clear
.onChange(of: minY) { value in
if value < mainOffsetY{
DispatchQueue.main.async{
withAnimation {
show = false
}
}
}
if value > mainOffsetY{
DispatchQueue.main.async{
withAnimation {
show = true
}
}
}
}
}.frame(height: 1)
GeometryReader{ proxy in
let minY = proxy.frame(in: .global).minY
Color.clear
.onChange(of: minY) { value in
if abs(value - lastminY) > 10 { //임계값 10으로 설정
lastminY = value
withAnimation {
if lastminY < mainOffsetY {
show = false
} else if lastminY > mainOffsetY {
show = true
}
}
}
}
}.frame(height: 1)
6 - 해당잇슈를 구현하다 생긴 문제