I'd like to detect when the user of my tvOS app clicks the Siri Remote with two fingers on the trackpad. (Currently, clicking with one finger increments; I'd like clicking with two fingers to decrement.) On iOS, detecting a two-finger tap is pretty easy: just attach a UITapGestureRecognizer with numberOfTouchesRequired set to 2. But I can't seem to make this work on tvOS. Any ideas?
I tried looking in the official tvos documentation, but i can't confirm that it is "one-touch" or "multi-touch".
Though, from my current testing and exploration with the siri remote, it only supports one touch.
Related
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,
i'm trying to implement new "quick menu widget" in iOS 10 available with 3dtouch.
My app has multiple today extension and apple guidelines report
If your app has multiple widgets, pick one to appear in the quick action menu that appears when someone applies pressure to your app icon on the Home screen using 3D Touch.
I don't understand where i can "change" that!
With only one widget all works as well.
There is a new Info.plist key UIApplicationShortcutWidget which you need to set to the bundle identifier of your widget.
See the documentation at: https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW32
I have done quite a bit with gesture recognizers for iOS, but I am now doing work in OS X, and I am lost.
I want to duplicate the functionality that exists like in Finder where you can two-finger swipe (on your magic mouse) to go back/forward through a directory tree.
I have an NSWindow based app that looks very similar to Finder. I have used apps before that allows you to build your own gesture recognizers so I know it is possible to do it, but I don't see any documentation on it.
What do I need to do to implement these gestures?
Mac now has:
NSClickGestureRecognizer
NSMagnificationGestureRecognizer
NSPanGestureRecognizer
NSPressGestureRecognizer
NSRotationGestureRecognizer
Available in storyboards too.
You can read about Handling Trackpad Events in the Cocoa Event Handling guide. The system can detect some pre-defined gestures (swipe, rotate, etc.) or you can listen to the raw touch events, which travel up the NSResponder chain, just like regular mouse events.
Looks like there is also an Event Recognizer class in CZKit. https://github.com/CarterA/CZKit
I haven't used this (yet), so YMMV.
Q The question is, is there a way to disable the animations happening with the trackpad-gestures at the currently public-available Xcode 4.3.2 running MacOS 10.7.3 ?
Description I'm very concerned with the new Lion animations while going forward/back with a trackpad gestures. With a keyboard shortcuts the page changes instantly and with a gesture it takes about a second or two spraying around my concentration on the things that need to be found in the code.
Tried What i tried is to read the defaults in the Terminal looking for any animation/duration keys - without success.
Notes Looks like mr. Cook criticizes the things Apple is doing itself while preparing the combined mobile/stationary look&feel. If there's any startup project that collects all the user's customizing, i'll be glad to know. So far i tried the itweax application, it doesn't have yet the expected features however.
Safari stuff is not as much about the content importance, so i would not mind to leave the Safari animations, but changing it on the system level for all the apps is also good.
PS I believe that is about the “software tools commonly used by programmers” mentioned at “What kind of questions can I ask here?” SO FAQ section.
Don't know about disabling animations but if you want to trigger app keyboard commands through gestures, I found BetterTouchTool helpful with some of the major Lion annoyances. Ex. I was able to configure FireFox to do Home/End on a 3-finger swipe up/down.
No, there is no way to disable the animation.
You can, however, disable the page swiping functionality:
System Preferences > Trackpad > More Gestures > Deselect "Swipe between pages"
Unfortunately, there is no setting to disable or change the speed of the animation.
After a period of iPhone work, I'm once again working on normal Cocoa apps on my MBP
and I miss the "tap" gesture. I know that I can turn on the incredibly annoying "Tap to Click",
feature in the Trackpad control pannel, but I don't want a click, I want a tap.
I know it's probably not mac canon, but is it possible to receive this multi-touch style event?
You might want to have a look at the native code underpinning my Java API: http://kenai.com/projects/macmultitouch