Is it possible to do an edge swipe in iOS simulator? - xcode

iOS 7 provides for a UIScreenEdgePanGestureRecognizer which detects swipes in from edges of the screen. Can this gesture be simulated using the iOS7 simulator in Xcode? Clicking and dragging outside the screen area just moves the whole simulator frame around.

On Simulator Version 11.4 I see the option
Window -> Show Device Bezels
which shows a virtual device frame around the simulated phone:
This allows to start the gesture "outside" of the screen. I could successfully trigger a UIScreenEdgePanGestureRecognizer from the left.

You don't have to swipe across the edges to trigger a UIScreenEdgePanGestureRecognizer, just start very close to the edge. It works if I start not more than ~15 points from the edge.
(this if for the simulator. I never tested this on a device)
As a side note: You have to create a gestureRecognizer for each edge. You can't OR edges together, so UIRectEdgeAll won't work.

Related

Xamarin Forms buttons stop receiving mouse clicks after clicking on SkiaSharp CanvasView on iOS

I use SkiaSharp canvas to draw the main game screen, and then there are various Xamarin.Forms Buttons around the UI. This all works fine on when used directly on iPhone or iPad using a finger. However, when I connect a mouse (e.g., through a MacBook or otherwise), the buttons start working with about 10% chance after mouse-clicking on the SkiaSharp canvas (and not receiving the mouse click events with 90% chance). The SkiaSharp canvas itself works just fine.
If I bring up the iOS app launch menu from the bottom (which probably somehow temporarily exists the mouse navigation on the app), the buttons start working again with the mouse. But if I click the SkiaSharp canvas again with the mouse, the buttons have a high chance of becoming disabled again. If I change to using a finger, all works fine (even if the mouse clicks were not being registered immediately before). However, mouse clicks are not being registered even after touching with a finger, so finger-touching does not reset the issue with the mouse (but bringing up the menu from the bottom does).
We found this bug by testing the iOS game on MacBook Pro (the iOS apps recently came available on the App Store) but the same issue persists also directly with an iPad / mouse combination. It seems to be some sort of an issue between using a mouse (on iPad or on MacBook Pro), SkiaSharp canvas and Xamarin.Forms buttons.
Does anyone know what the root cause of the problem is and what is the workaround?
Not an answer as such, but some more information about reproducing the issue: A simpler repro case may be this small project: https://github.com/jrc14/TraceMatching/ .
Don't worry too much about what it's doing, but note that you're mean to click in the grey Skia canvas in the middle to create 'targets' - and that after you've done that, mouse-clicks are getting lost.
If you run it on a Mac, you'll see that, though the clicks get lost after you've clicked on the Skia canvas, they will start being received again if you click on something else (another app, or the Mac background).
(further edit) - after some noodling around I did find a workaround. If, once you've finished processing the touch action on the SKCanvasView, you reset its EnableTouchEvents property (i.e. set it to false, then back to true again), it seems that the clicks don't get lost any more,

Delays and laggy behaviour with Iphone X simulator

Im currently testing my Ionic app on the Xcode simulator. It works super fine on every ios device except for the Iphone X. When you slide on the ion-ranges, the animations are strongly delayed, the scrolling is laggy and not smooth. The transitions with click or swipe events are also very laggy and delayed. Have you also expererienced similar things with the IphoneX simulator or do you know how to solve this problem?
I noticed that if I click and try to scroll while holding down the mouse button on the iPhone X simulator, the scroll is very laggy and sometimes won't update until I release the mouse button. Yet on the other simulators, the scroll is smooth as butter, even if I hold down the mouse button (rather than click and flick).
If I change the iPhone X to 'physical size' using the simulator menu (window -> physical size), the scrolling is still laggy. But if I manually resize the window of the iPhone X to anything other than 'physical size', the scrolling becomes smooth like all the other device simulators.
I don't know why, and it's not always consistent, but it seems to work most of the time. Hopefully this helps someone with this annoying problem.

Mac OSX fullscreen on multiple displays swiping moves all screens

This worked up until yesterday.
Before and after updating to MacOS Sierra 10.12.5 did not solve problem.
Config / Specs:
Macbook pro OSX
Dell monitor
iPad using Duet app
Previous functionality
I could expand fullscreen any app/program in Mac (the green button top right) and use 3 fingers on the trackpad to toggle between 'screens' on that individual physical screen.
Current bug
When I fullscreen an app on one display and swipe with three fingers, swiping controls all 3 physical displays. The display in question swipes to the app, but the other two displays also swipe to the right showing blank black or white backgrounds and are mouseover-able.
Desired functionality -- the Previous Functionality
Swiping on a screen only controls that display.
Had the same issue, there is a setting in Mission Control -> Displays have separate Spaces, checking this solves the problem for me.

rotate display in Simulator for tvOS app

I have a react native app that will be deployed to tvOS. Currently, I am building with the help of Apple's Simulator.
It is stuck in landscape mode, and the TV that will be deployed to is in portrait mode.
I cannot rotate the Simulator to portrait mode though, and I am stuck. I have spent an hour or so googling around and I cannot find an answer to how to rotate my tvOS app. The option is in Hardware > Rotate Left but it is greyed out.
How can I rotate my tvOS app 90 degrees?
At least so far, with tvOS 10.2. Only landscape orientation is supported by AppleTv.
As you can see, the definition of UIDeviceOrientation is flagged as __TVOS_PROHIBITED
typedef NS_ENUM(NSInteger, UIDeviceOrientation) {
UIDeviceOrientationUnknown,
UIDeviceOrientationPortrait, // Device oriented vertically, home button on the bottom
UIDeviceOrientationPortraitUpsideDown, // Device oriented vertically, home button on the top
UIDeviceOrientationLandscapeLeft, // Device oriented horizontally, home button on the right
UIDeviceOrientationLandscapeRight, // Device oriented horizontally, home button on the left
UIDeviceOrientationFaceUp, // Device oriented flat, face up
UIDeviceOrientationFaceDown // Device oriented flat, face down
} __TVOS_PROHIBITED;

Xcode iPad simulator keyboard opens in middle of screen

I am running xcode 4.3.2 and just started having the following problem.
All projects running in the simulator are positioning the popup keyboard in the center of the IPAD simulator. The IPHONE simulator is fine with the normal keyboard positioned at the bottom of the screen. Even a simple new project with a single text field shows the keyboard in the middle of the screen with equal amounts of white space above and bellow. This occurs in all orientations.
Interestingly, UIPickerViews also exhibit the same behavior.
This is driving me nuts, as it has been fine for many months and now all the objects (text fields etc.) are hidden when the keyboard plops down smack in the middle of the screen.
Please help. Thanks in advance.
Tom
This is a feature of the iPad. You can "drag" the keyboard with the drag handle in the lower-right hand corner of the keyboard. The image from this blog post by Rob Rogers indicates how to use it. My guess is you inadvertently moved your keyboard.

Resources