Is there a way to test if accessibility zoom is on? - ios

I'd like to know if there is a line of code like isAccessibilityZoomOn to test if accessibility zoom is on. In a game I am working on, if you use zoom, the game glitches and a timer continuously goes, even though it shouldn't unless a finger is on the screen. I'm currently using the ccTouchesBegan method to start the timer, but if you have zoom on and use three fingers to tap the screen you can remove your fingers and the timer continues.

I don't believe Apple lets you access that kind of information. That is a strange effect, possibly caused by the tap to zoom in?

Related

Is it possible to disable the iOS five finger touch handling from an app?

We have a palm scanning app and occasionally putting the palm on the app gets read as a 5 finger pinch or opposite of pinch gesture, which exits the app. Is there some way we can make it work?
I had completely missed the multitasking gestures setting which solves this in our case.

iOS: Detect if touchEnded comes from sliding off screen or lifting finger?

In iOS is there any way to tell, when the touch ends, if it ended by sliding off the screen or if the user lifted his finger?
I don't know why, but I expected the touch to be cancelled when this happened, but it is not.
Thanks.
This is standard iOS behavior, you may see it in any Apple's app.
You may check if touch ended at the end of screen and treat it as "cancel sliding", but user might be wanting to slide this far.
My advice is accept it, because, as I said before, it's standard behavior, and Apple tells us to stick to it - users expect standard behavior.
Only through deduction. If the finger was moving towards the edge of the screen and then the touch ends near that edge, you can be relatively certain that the finger indeed slid off the screen. If it wasn't moving immediately before the touch ended, the user probably just lifted their finger.

How to make toggle for iOS game to control movement?

I'm making an iOS game, and I want to be able to control the movement of my character with a toggle.
My idea is that when the user touches the screen with their thumb / finger, I will record where the touch began, and then whichever direction the users thumb is compared to where the touch began is the direction the character should move.
How could I setup a touch gesture recogniser to do this?
Cheers
Hmm, it sounds to me like you are thinking of this at too high of a level. You don't need a "gesture recognition system" to do this. You know how to tell whether and where the touch is down? You know how to tell what time it is? Each time through your main loop, check if the touch is down / still down. When it first goes down, record the location and time. If later you see that it hasn't gone up and it's positioned a certain number of pixels to the right, you know it slid over there. And by comparing the times you know how fast it slid over there.
And of course you might want to check out Cocos2d for a library that does some of this for you. But it's worth doing yourself first, just to learn it.

Can a swipe event fire before the user raises his or her finger?

I am using swipes to navigate through the pages of my jQuery mobile / PhoneGap application. Do you know if it is possible to let the page transition start after the swipe distance of (for example) 50 px? In other words: It should start before the finger stops touching the screen.
That would advance the user experience as they don't have this little waiting time between raising their finger and the actual page transition.
Thanks for you time!
It should be capable using the 'touchStart' and 'touchMove' events. Record the position of the touch when 'touchStart' fires and then check the displacement whenever 'touchMove' fires. If the displacement exceeds 50 px, call your page switching function. 'touchEnd' will be fired when the user lifts their finger, so you may need to compensate for that if any special actions occur then.
A good place to start is Padilicious's swipe library (http://padilicious.com/code/touchevents/). This can easily be modified to support a swipe-distance setup.
Let me know if you need anymore information.

2 fingers touch UIWebview, make my app crash

UPDATE
I'm looking for the best way to detect more than one finger on a particular view at time in this case the view is UITextview. I'm not detecting taps or pinching, just the fact that more than one touch is happening. In this case, i set textview.multipleTouchEnabled=NO and then i didn't set gesture anywhere. And i didn't set the zoom in UITextView. And i didn't override some of touches method in that controller.
the problem is, when i touch my app on the device using a touch like pinching, or touch use more than one finger, the app got crashed and no error log in the debugger console. I try to debug this app, but i dont know what i'm looking for.
UPDATE 2
i was wrong about the object that get user touch, i was thought that the object is UITextview, but UIWebview. So, this problem is happen when i touch UIWebview with 2 fingers. I have forwarded the touches event using this suggestion. But i still confuse, how to clear up this crash on my app.
Can somebody help me??
Thank You
Regard,
Risma
Check that text view zoom level is set by default it's min and max zoom is 1.
In pinch gesture you have to set scale factor.

Resources