EdgeSwipe Events
EdgeSwipe events receive the gesture event properties.
译:边缘滑动手势事件的属性
Basic
Events.EdgeSwipe— Swipe from any edge of the screen. 译:从屏幕的任何边缘滑动。Events.EdgeSwipeStart— Start edge swipe. 译:开始Events.EdgeSwipeEnd— End edge swipe. 译:结束
# Swipe from any edge of the screen
Screen.on Events.EdgeSwipe, (event) ->
print event.distance
EdgeSwipe Event Shortcuts
译:边缘滑动事件的快捷键
#for Events.EdgeSwipe
Screen.onEdgeSwipe ->
print "Swiping from edge"
#For Events.EdgeSwipeStart
Screen.onEdgeSwipeStart ->
print "Start swiping from edge"
#For Events.EdgeSwipeEnd
Screen.onEdgeSwipeEnd ->
print "End swiping from edge"
Top
Events.EdgeSwipeTop— Edge swipe from top. 译:从顶部边缘向下滑Events.EdgeSwipeTopStart— Start edge swipe from top. 译:开始Events.EdgeSwipeTopEnd— End edge swipe from top. 译:结束
# Swipe from the top edge of the screen
Screen.on Events.EdgeSwipeTop, (event) ->
print event.distance
EdgeSwipeTop Event Shortcuts
译:从顶部边缘向下滑动事件的快捷键
# For Events.EdgeSwipeTop
Screen.onEdgeSwipeTop ->
print "Swiping from top edge"
# For Events.EdgeSwipeTopStart
Screen.onEdgeSwipeTopStart ->
print "Start swiping from top edge"
# For Events.EdgeSwipeTopEnd
Screen.onEdgeSwipeTopEnd ->
print "End swiping from top edge"
Right
Events.EdgeSwipeRight— Edge swipe from right. 译:从右边缘向左滑Events.EdgeSwipeRightStart— Start edge swipe from right. 译:开始Events.EdgeSwipeRightEnd— End edge swipe from right. 译:结束
#Swipe from the right edge of the screen
Screen.on Events.EdgeSwipeRight, (event) ->
print event.distance
EdgeSwipeRight Event Shortcuts
译:从右边缘向左滑动的快捷键
#For Events.EdgeSwipeRight
Screen.onEdgeSwipeRight ->
print "Swiping from right edge"
#For Events.EdgeSwipeRightStart
Screen.onEdgeSwipeRightStart ->
print "Start swiping from right edge"
#For Events.EdgeSwipeRightEnd
Screen.onEdgeSwipeRightEnd ->
print "Start swiping from right edge"
Bottom
Events.EdgeSwipeBottom— Edge swipe from bottom. 译:从底部边缘向Events.EdgeSwipeBottomStart— Start edge swipe from bottom. 译:开始Events.EdgeSwipeBottomEnd— End edge swipe from bottom. 译:结束
# Swipe from the bottom edge of the screen
Screen.on Events.EdgeSwipeBottom, (event) ->
print event.distance
EdgeSwipeBottom Event Shortcuts
译:从底部边缘向上滑事件的快捷键
# For Events.EdgeSwipeBottom
Screen.onEdgeSwipeBottom ->
print "Swiping from bottom edge"
# For Events.EdgeSwipeBottomStart
Screen.onEdgeSwipeBottomStart ->
print "Start swiping from bottom edge"
# For Events.EdgeSwipeBottomEnd
Screen.onEdgeSwipeBottomEnd ->
print "End swiping from bottom edge"
Left
Events.EdgeSwipeLeft— Edge swipe from left. 译:从左边缘向右滑动Events.EdgeSwipeLeftStart— Start edge swipe from left. 译:开始Events.EdgeSwipeLeftEnd— End edge swipe from left. 译:结束
# Swipe from the left edge of the screen
Screen.on Events.EdgeSwipeLeft, (event) ->
print event.distance
EdgeSwipeLeft Event Shortcuts
译:从左边缘向右滑动事件的快捷键
#For Events.EdgeSwipeLeft
Screen.onEdgeSwipeLeft ->
print "Swiping from left edge"
#For Events.EdgeSwipeLeftStart
Screen.onEdgeSwipeLeftStart ->
print "Start swiping from left edge"
#For Events.EdgeSwipeLeftEnd
Screen.onEdgeSwipeLeftEnd ->
print "End swiping from left edge"