How to stop scrolling while holding? - windows-phone

I'm trying to disable scrolling when the user start to dispatch holding event. I found this answer that disables scrolling dinamically, but this only works after I stop holding, what I think is that, because screen's manipulation already started, scroll can't be disabled until user stops to touch the screen.
There is a way to prevent this behavior and stop scrolling while user is holding?

Related

Prevent user from "grabbing and dragging" scroll bar handle?

For lack of a better way to describe it - there are 3 ways to manipulate a live scroll bar in application: clicking the arrows, clicking above/below the handle (that goes up and down), and clicking and dragging the handle itself.
When the user clicks and drags the handle on my DataGridView with a custom class, it causes a painting issue where the gridlines will disappear when you scroll down, then back up. This doesn't happen when using the other two methods of scrolling.
I can't seem to figure out a solution to the painting problem, so it seems the scroll bar might be easier to solve the problem. Is it possible to disable that grab and drag?

How to make VoiceOver work when the input view is moving

I have an iPad app that presents a UITextField inside a UIPopover when a button is tapped. This button is near the bottom of the screen. So, the user taps the button, the popover appears and becomes the first responder, which causes the keyboard to appear. This, in turn, causes the popover to move up as the keyboard slides in. This works fine, except for VoiceOver.
It appears that VoiceOver gets confused by the moving view. It starts to describe the new text field, but then stops mid-word as soon as it starts to move.
Does anyone know of a good work-around. The best I've come up with so far is to listen for UIKeyboardDidShowNotification and then find some way to kick VoiceOver to talk again, though I'm not sure how to kick VoiceOver into action.
You can inform VoiceOver of changes to your screen layout by using the accessibility notifications - UIAccessibilityLayoutChangedNotification or UIAcessibilityScreenChangedNotification would be good candidates.

Touch detection without event processing

I am using cocos2d. I would like to be able to detect whether the screen is touched at a particular instant - that is, rather than intercepting an event when it occurs, I want to detect the presence of touch at a particular moment.
The reason is that I am animating sprites and want to determine if the sprite should keep moving - if the screen is still touched. I cannot use ccTouchesEnded because each time an animation starts I set isTouchEnabled to false because I also want the user to be able to tap rapidly on the screen to move the sprite but if they tapped too rapidly, it would mess with the position of the sprite during the animation process - which I have found screws up the positions of my objects in weird ways.
Is this possible?
There does not appear to be any public API to detect touches other than enabling and receiving these events in the main UI run loop.
You can keep handling events, and set the state left by the last touch event in a model object or global variables. Then you can poll your app's own internal state at any time.
Instead of disabling touches, you can just have your touch handler not do inappropriate things if the event time stamp is too close to some animation start time.

Reverse animation before it is finished

I have a button and when the user touches down and holds a popup appears. However, when the user releases his thumb before the pop animation finishes I'd like the animation to stop where it is and autoreverse to the initial position. How can I accomplish this?
Currently I'm simply using UIViews -animateWithDuration:animations:completion:. Do I have to set the animations explicitly in this case?
I've already tried reading the current state from the presentationLayer properties, but that somehow didn't work.
You can start the second animation using the UIViewAnimationOptionBeginFromCurrentState option. This will stop the first animation if it's still running.

How can I differ between manual and automatic scrolling in NSScrollView/NSTextView

I subclassed NSTextView and added support for automatic scrolling in a userdefineable time.
Now I want to detect, if the user manually scrolls, while the view is scrolling automatically.
Then I want to immediately stop automatic scrolling, until the user stops his action and then I want to start scrolling again from the new position.
I want to do this in such a matter, that the user can move around without a stuttering view.
I use boundsDidChangeNotification to calculate the scrolling position (playtime) and show it in a label, but I can't use it to detect the user manual scrolling, because it is also pushed by the automatic scrolling...
Would be very nice, if anyone has an idea ;-)
Thanks in advance
Gerald