I have an openGL ES app i'm working on, and i added some gestures:
Pan - 1 & 2 fingers, for moving the object
Pinch - Zoom in and out on the object
Rotation - Just to rotate the object
I can't test these gestures on an iPhone since mine is currently out of use, and i wanted to know is there any way to test these gestures using Xcode's iPhone simulator and the Mac's touch pad?
Currently i could only test the pan gesture since i can click on the Mac touch pad and drag my finger around, so pan does work, but only for 1 finger.
How can i test all the other gestures? is there a way to define that on the iPhone simulator?
Hold down the Option key.
Developer Doc
As Peter says, hold down the option key (alt key on a Windows keyboard) while hovering the mouse over the simulator's screen. That causes 2 points to show on the screen. It's not perfect, but it's better than nothing.
Apple has had multi-touch trackpads and mice for Mac for what, 3 years now, but they still have not added multi-touch support to the simulator. If this was an end-user feature it would have been added years ago. Us developers are not a priority for Apple it seems. :(
You can hold down alt key while pressing left mouse button.
Related
I have started working with SwiftUI Demo.
But I am not able to scroll the Preview canvas in Xcode.
Yes there is button for zooming like - 100 + .
I have seen a video where person is scrolling this canvas during the tutorial
is there any option in Xcode to enable scrolling in preview canvas ?
Seems to be a trackpad vs mouse wheel issue. Try scrolling with the trackpad, it should work until Apple gets this bug patched. Haven't tried with a bluetooth trackpad, might be worth looking into.
On my MacBook Pro (Big Sur, 11.2.3), I place two fingers on the trackpad and move them up and down to scroll between previews in the canvas of Xcode 12.5 beta 3.
Hope that helps. I'm new to Mac to perhaps this was just obvious to everyone else.
Is there is any way to add mouse and trackpad's gesture like scrolling in simulator screen.
Yes, but you would have to create a Mac app that got these events and then translated them to what the simulator was expecting
This project:
https://code.google.com/archive/p/accelerometer-simulator/
Tries to do something similar but with the accelerometer (since MacBooks have one).
This answer links to some tutorials that show you how to do what that project is doing: https://stackoverflow.com/a/16558215/3937
The accessibility elements are being read correctly in the background, i.e the labels being read can only be heard but cant see the screen as it blacks out, just the screen goes dark. Anybody come across the issue?
Verified this is in iOS 11 with iPhone 6s, iPhone 7 plus.
(Project is in Swift although it must not matter)
Found out that with 3 finger triple tap on screen , the above setting gets disabled. And the Accessibility Voice Over starts to work as normal, i.e reading the labels with the screen turned ON.
I am testing multi touch support on Safari mobile. So far, i realized i can simulate a pinch gesture on iphone simulator (just holding option key), however i cannot do the same when i change the device to be the ipad.
Any idea: is that a bug, any settings or it changes the simulation process depending on the device.
I have the same problem with the simulator of Xcode 4.3.2: Multi-touch-gestures with the ALT-key work in iPhone-mode, but not in iPad-mode. It cannot be a mistake in my source code, because this is even the case when going to the home-screen in the simulator by pressing Cmd+Shift+H.
I found the following work-around: Use Cmd+2 or Cmd+3 to reduce size of the iPad-window, then multi-touch-gestures with ALT-key will also work in the iPad-simulator. By pressing Cmd+1 you can return to the original size of the iPad-simulator.
i dont have device so how can i test double finger touch for rotation and pinch?
Hold down alt key in simulator.