Five Finger Pinch Close in UI Automation - ios-ui-automation

I want know whether five finger pinch gesture can be simulated using UI automation iOS.
The five finger pinch minimizes the app and shows the device home screen.
I know the pinchCloseFromToForDuration but it only handles 2 finger pinch gesture.

This can be achieved only on devices that have been jailbreaked.
5 finger pinch is a default feature for Apple iPad and cannot be simulated devices that have not been jailbreaked.
However, 2, 3 & 4 finger can be done using pinchCloseFromToForDuration.

Related

Ios 6 news feed (hidden page)

I want to create a hidden page on top of main screen (like iOS 6 news feed) and a button at the top-right corner. When people push it or hold it and swipe toward downside, the hidden menu will appear. Honestly I don't have any idea about it.
If you want to have more complex events than just a tap on a button you should be looking at using a UIGestureRecognizer. For the types of interactions you're describing you will likely need 2 recognizers - UILongPressGestureRecognizer for the tap and hold, and then a UIPanGestureRecognizer for the downwards swipe. You might be able to use a UISwipeGestureRecognizer rather than the pan but I'm not sure if a swipe needs to start with an independent tap from the long press.
Good resources for learning about gestures are:
Gesture Recognizer Basics - Apple
UIGestureRecognizer Tutorial from raywenderlich.com

Objective-c call touch on screen without user touching the screen

Im going to be using a framework that allows a iphone app to control my app on iPad. When i add it im going to make the joystick move a image of a mouse, and when the user presses the A button, i want to make the device think the user is touching at that point. Is there any way to do this?
Example: I place a button on the ipad screen at 0,0 with height and width of 100. then mouse is at point 50,50 and when the user presses and holds A, that button is held down, and when user lifts up, it calls that buttons action.

Disable the "Notification Center" on iPad (phonegap) application

Is there any way to remove the swipe event that pulls in the notification center from the top of the ipad when developing an ipad app? If there is an easy way in PhoneGap, that would be best, if not - I can manually implement any Objective-C solution.
The app is already in full screen, and there are some gestures that including swiping at the top. These iPads are distributed to the sales force of this company, and they want that feature (top swipe notification center) disabled.
Cheers!
When your app is in fullscreen mode, Notification Center switches to a two-swipe system: swipe once to bring up a little handle, and swipe down on the handle to bring up Notification Center. This should avoid most interference.
Other than that, there's no public way to disable this gesture.
Of course not. At least not without a jailbroken phone. Notification Center is built into the OS and cannot be disabled by third party apps. As #jtbandes pointed out, their is the "handle" option, but there is no way to completely disable the functionality.

ios simulator: simulate swipe and drag

I have a UIView within a UIScrollView. When i want to simulate the drag event on the UIView, swipe event on the UIScrollView is being triggered.
As per the documentation , there isn't much of a difference between swipe and drag.
Swipe
1- Place the pointer at the start position.
2- Hold the mouse button.
3- Move the pointer in the swipe direction and release the mouse button.
Drag
1- Place the pointer at the start position.
2- Hold down the mouse button.
3- Move the pointer in the drag direction.
On an ipad I can use two fingers two swipe and one finger to drag. Now, how do i go about doing something similar on the simulator; drag instead of a swipe?
Edit 1:
I should have been clearer first up. Anyway, my problem is that the mouse drag is firing the swipe instead of drag, thereby scrolling the scroll view instead of passing on the drag event to the UIView contained by the scroll view.
I am on macbook pro. Two-finger swipe on the touchpad is being ignored. Touch and drag is causing the same thing as mouse-drag.
Thanks
See Jeff LaMarche's quick note on how to do this. It's documented in the same page you're reading, but Jeff's explanation is clearer.
If you want to simulate a two-finger gesture in the iPhone simulator, hold down the option key. You will get two dots on the screen instead of one. The two dots will default to pinching - if you bring the dot closer to the center of the screen, the other dot comes toward the center, making it easy to simulate a pinch in or pinch out.
If you want to do a different two-finger gesture, get the two dots the distance apart that you want them to be, then hold down the shift key, while still holding down the option key. That will lock the position of the two finger presses together so you can do, for example, a two-finger swipe.
see this documentation below:
iOS Simulator User Guide
Just use the mouse to drag the view, aka, left click the view then move the mouse
I ended up disabling the scrolling from the UI and added two buttons to scroll the scroll view. Since this is a work around only for the emulator, I have used #ifndef to hide the buttons while building for the device.

iPad view in incorrect orientation after dismissMoviePlayerViewControllerAnimated

My iPad app displays a movie full screen using the convenient MPMoviePlayerViewController class. I present it like this:
[self.hostController presentMoviePlayerViewControllerAnimated:playerViewController];
And later, when notified that playing is done, I dismiss it like this:
[self.hostController dismissMoviePlayerViewControllerAnimated];
It works fine, except when the user rotates the iPad during movie playback:
1- The iPad is in vertical orientation. My view is vertical.
2- The user starts the movie in vertical orientation. The player is vertical.
3- The user rotates the iPad to the horizontal orientation.
4- The player switches to its horizontal orientation. so far so good.
5- The movie stops, the player is dismissed, my reappears, the iPad is still horizontal, but my view has stayed in the vertical orientation is was in step 1. Now it looks sideways.
Of course, if the user then rotates the iPad, it's back to normal. My view then rotates normally as the iPad rotates.
Did anyone ever encounter that? An easy fix?
Thanks.
I've encountered this numerous times and it appears to be an Apple bug (and have reported it as such).
The only way (I've found) around this is to listen to UIDeviceOrientationDidChangeNotification and UIApplicationDidChangeStatusBarOrientationNotification notifications. Use the relative timestamp on these notifications; if they both occur within a second of each other, you can be sure that the status bar change is a result of the user switching orientations and not the media SDK changing the status bar orientation. Then, when the movie is finished, you can tell your view controller that it should rotate to landscape.