iOS Question Button with touch drag exit ?? touch drag inside ??

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
Hello everyone,

Whats the best way to create a button can be pressed WITHOUT unpress your finger?

for example:

we have this two buttons on screen:

[<-] and [->]

imagine the user press on screen on first button and drag the finger to another button (without untouch screen)

I need to receive two events: on first button (untouch) and second (touch)

is it possible on B4i?

thank you
 

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
@Erel , even with Panels, dont work, because when you press one panel is working fine, but if you DO NOT UNPRESS and drag to another, this second one not firing the touch event

1585259965425.png


B4X:
Sub pnlButtonA_Touch(Action As Int, X As Float, Y As Float)
    Log("Button A = " & Action & "/" & X & "/" & Y)
End Sub

Sub pnlButtonB_Touch(Action As Int, X As Float, Y As Float)
    Log("Button B = " & Action & "/" & X & "/" & Y)
End Sub

Look this log below, in this point, when drag the finger from B to A, I dont start to receive the A events, any idea? or you mean create JUST ONE PANEL and put two fake buttons inside?

1585259784630.png
 
Last edited:
Upvote 0
Top