Mercurial > public > simoleon
comparison Simoleon/Helpers/ListModifier.swift @ 154:8afba86ab8dd
Refactor code
author | Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com> |
---|---|
date | Wed, 25 Aug 2021 10:43:12 +0100 |
parents | 1069c33d3a42 |
children | e4cbb1eea394 |
comparison
equal
deleted
inserted
replaced
153:2590ee472aa9 | 154:8afba86ab8dd |
---|---|
10 struct ListModifier: ViewModifier { | 10 struct ListModifier: ViewModifier { |
11 func body(content: Content) -> some View { | 11 func body(content: Content) -> some View { |
12 content | 12 content |
13 .id(UUID()) | 13 .id(UUID()) |
14 .listStyle(PlainListStyle()) | 14 .listStyle(PlainListStyle()) |
15 .gesture(DragGesture() | 15 .gesture( |
16 DragGesture() | |
16 .onChanged({ _ in | 17 .onChanged({ _ in |
17 UIApplication.shared.dismissKeyboard() | 18 UIApplication.shared.dismissKeyboard() |
18 }) | 19 }) |
19 ) | 20 ) |
20 } | 21 } |
21 } | 22 } |