我需要检测所有向左滑动和向右滑动的滑动,包括向上滑动。我的意思是我需要检测180度区域内的所有滑动,我不确定我是否足够清楚。当我添加.up .right和.left时,它没有检测到对角线,如左上角,我该怎么办?谢谢!
答案 0 :(得分:4)
UIPanGestureRecognizer是实现这一目标的方法:
Sub Refresh()
Dim PN
Dim Supervisor
Dim Location
Dim r As Range
Dim r1 As Range
Set r = Worksheets("sheet1").Range("A2")
Do Until IsEmpty(r)
PN = r.Value
Location = r.Address
Set r1 = Worksheets("sheet4").Range("C2")
Do Until IsEmpty(r1)
If PN = r1.Value Then
Supervisor = r1.Offset(0, 18).Value
End If
Set r1 = r1.Offset(1, 0)
Loop
r.Offset(0, 5).Value = Supervisor
Set r = r.Offset(1, 0)
Loop
End Sub