last day (14 days later) » 

11:47 AM
0
Q: SwipeAction is Triggering with a Delay

ShrutiI have included a swipe gesture in my app to open a side bar when swiped. I am using XYOrigami to achieve the swipe. Everything is fine but my problem is the swipe action is triggering after a delay. I swipe and when the swipe is over then after few-millisecond its action is triggering. I want th...

 
You would need to implement UIPanGestureRecognizer.
 
@JakubVano I am using UISwipeGesture. I need to swipe and open a side bar
 
Swipe gesture triggers actions only after it has finished. You want "action to follow the finger motion", thus you need pan gesture.
 
@JakubVano Can i trigger Pan gesture with single touch motion?
 
Sure. Pan gesture is for moving stuff around via touches.
 
11:47 AM
@JakubVano but my problem is i have left and right both side bar and scrollview on my main page. How will i differentiate between these?
@JakubVano ...
 
I would say that that is not only problem - I suspect that it won't be easy to modify XYOrigami to support panning
AFAIK it does not support it by default
 
No that is not a problem. Because XYOrigami just helps to open a side bar on a action i.e on a button click or something. So i implemented that on swipe
 
Ok, let me clarify: Now it works like this: You swipe -> gesture recogniser triggers -> plays XYOrigami animation. You want to move finger around to control animation. That might be much bigger problem than you realise
 
Not actually control the animation (i.e i do not want to close the swipe if i move my finger back in between or so) i just want the action to trigger as soon i start swiping. i do not want that delay
 
Oh, ok, I misunderstood. I suppose you and implement UIPanGestureRecognizer to trigger action after small movement of finger.
*you can..
 
11:58 AM
that sidebar is opening after a delay after i stop swiping. I just want to open that as soon as i start swiping
I cannot use pan.. As i have left right swipe and i have scroll view on main page. So i need to differentiate between these
 
Well, with swipe you cannot do it. From documentation: "A swipe is a discrete gesture, and thus the associated action message is sent only once per gesture."
 
is there any other way to achieve this?
 
If I were you, I would try to disable scrollView for testing purposes and add pan gesture to test if the result is satisfiable. If it were, I would search for solutions enabling scrollView and pan gesture.
Besides that, I know of no other way to accomplish what you need.
 
Ok Thanx. i will try to do the same.
 

last day (14 days later) »