๐Long Press
Last updated
Last updated
SwiftUI โฉ Gestures โฉ Long Press
โญ๏ธ .onEnded()
ๅชๆๆ้ๆ่ถ
้ minimumDuration
ๆๆ่งธ็ผโ๏ธ
if the user stops touching the view before minimumDuration
seconds have elapsed or moves their finger more than maximumDistance
points SwiftUI does not invoke the onEnded(_:)
callback.
โญ๏ธ .onChanged()
ๅช่ฆๆธๅฐ๏ผๅฐฑๆ่งธ็ผ๏ผไฝใๅช่งธ็ผไธๆฌกใ๏ผๅฐฑ็ฎๆธๅไน
๏ผไนๅช่งธ็ผไธๆฌก๏ผไธๆ้ฃ็บ่งธ็ผ๏ผ้้็ value
็ธฝๆฏ true
ใไฝใๆฏๆธไธๆฌก๏ผๅฐฑ่งธ็ผไธๆฌกใใ