Explorar el Código

remove popup by swipe

Ivan Valkou hace 5 años
padre
commit
1c2e299ae5
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  1. 8 0
      FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

+ 8 - 0
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -155,6 +155,14 @@ extension Home {
                 .onTapGesture {
                     isStatusPopupPresented = false
                 }
+                .gesture(
+                    DragGesture(minimumDistance: 10, coordinateSpace: .local)
+                        .onEnded { value in
+                            if value.translation.height < 0 {
+                                isStatusPopupPresented = false
+                            }
+                        }
+                )
             }
         }
     }