gesture

UILongPressGestureRecognizer issue with uibutton and uilabel

风格不统一 提交于 2019-12-11 12:53:11
问题 i have 2 uibutton and 1 label and longpressgesture is bounded to these control. when longpress is taken place on any control then how to get the object on which longpress is taken place below is the code that i have written. UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(80.0, 210.0, 160.0, 40.0); [btn addTarget:self action:@selector(wasDragged:withEvent:) forControlEvents:UIControlEventTouchDragInside]; //[self.view addSubview:btn]; btn

Making Android's ZoomButtonsController and GestureDetector get along

 ̄綄美尐妖づ 提交于 2019-12-11 12:42:58
问题 I've been stuck on this for a while now, and though I found a workaround I don't quite understand why it works and I should to implement it properly! There also seems to be a dearth of information on the ZoomButtonsController out there. Per other articles here, I've implemented "swipe" gesture functionality in my app. However, on a single tap, I also wanted the zoom buttons to appear programmatically. I had the GestureDetector-based OnTouchListener already for this ScrollView, and so I added

Use Swipe Gesture in UWP

两盒软妹~` 提交于 2019-12-11 10:38:35
问题 I've seen that since the latest update (Windows Fall Creators Update) there exists a collection of Swipe Classes, but in the current stable release of VS ( 15.4.1 ) there isn't a way to make it work. I'm currently running the latest W10 update (1709) with Visual Studio 2017 Enterprise ( 15.4.1 ) and there's no way to make it work. I've tried to make the following example work but with no luck: https://channel9.msdn.com/Events/Windows/Windows-Developer-Day-Fall-Creators-Update/WinDev015

Track swipes with Google Analytics

∥☆過路亽.° 提交于 2019-12-11 09:44:04
问题 I have a swipe functionality on my mobile page, and I want to used touchstart, touchend, and touchmove to track the swipe functionality across the device without affecting the scrolling. Here is my code. jQuery('.first-frame').bind('touchmove', function(event) { _gaq.push(['_trackEvent', 'Landing-Page', 'Swipe-Toggle-Color', '0259_2190']); }); 回答1: If it's possible to only monitor the swipeleft and swiperight events in jQuery Mobile instead, do so. Otherwise, you can set a global variable on

How to simulate touch events on Android device?

混江龙づ霸主 提交于 2019-12-11 09:15:18
问题 Does the Android API expose facilities for generating touch events, for example, repeatedly simulating different gestures on the screen for testing? 回答1: Doesn adb commands will work for u or u need some kind of monkay testing tool commands ??? For adb commands u can use below shell commands... adb shell input tap x y and also adb shell sendevent /dev/input/event0 3 0 5 adb shell sendevent /dev/input/event0 3 1 29 adb shell sendevent /dev/input/event0 1 330 1 adb shell sendevent /dev/input

How to handle swipe down gesture on an ImageView

别等时光非礼了梦想. 提交于 2019-12-11 09:06:08
问题 I am trying for recognizing swipe down gesture on an imageview. I tried GestureDetector but it's deprecated now. Sample code I am using is below. But, it's not going inside onFling() method. GestureDetector gestureDetector; gestureDetector = new GestureDetector(new GestureListener()); view.findViewById(R.id.imageView).setOnTouchListener(new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { if (gestureDetector.onTouchEvent(event)) { System.out.println("DONE-------");

Why I use “pan” after rotae will make view go opposite way?

社会主义新天地 提交于 2019-12-11 05:33:20
问题 Why using "pan" after rotate makes view go opposite way? It seems these two gesture are use diffrent coordinate system? Rotation use the one is rotated,and pan use the normal one? And if the view is rotated nearby 0' or 360 ',pan will be normal,and if the view is rotated more colse to 180',the "pan" will make view go opposite more. Thanks. 回答1: The point is that in your handRotate method you are assigning a rotation transformation to your view. This entails a permanent (until you modify the

C# and Kinect gesture time

纵饮孤独 提交于 2019-12-11 04:58:31
问题 I am currently developing some gesture recognition in C# with Kinect SDK.So far so good, the only problem being that the gesture recognition is instant. For example: i am using a messageBox to announce when i raise my hand above my head.And if i hold the hand for 2 seconds, it will open dozens of messageBoxes announcing the gesture. Is there a way to stop this? 回答1: Darren says the truth. You need to implement a stop mechanism. Kinect is analyzing everything in real time whole time so when

Javascript support for touch without blocking browsers pinch support

馋奶兔 提交于 2019-12-11 04:47:27
问题 I have a little web gallery that I added swipe navigation to for mobile browsers. I did it with pretty simple touchstart/touchmove/touchend event tracking. The problem is that when I try to pinch zoom in the browser window it fails if any finger starts in the element I added the touch event handlers to, I'm guessing from the calls to preventDefault. Is there a way I can track the touch events for navigating my images without blocking the zoom in and out feature of the browser? I don't mind

How to draw graphics in iphone gesture?

∥☆過路亽.° 提交于 2019-12-11 04:19:57
问题 I have a question to draw a line or circle indicator after user has pan gesture (i.e. user touches and drags their finger) on iPhone. However, UIGraphicsGetCurrentContext() always returns nil, does anyone know how to implement this on iPhone? Thanks, clu @interface MyView : UIView <UIGestureRecognizerDelegate> { CGPoint location; PanIndicator *panIndicator; } @implementation MyView - (id)init { if (self = [super init]) { UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc]