swipe

Limit UIView movement to only vertical or horizontal axis

99封情书 提交于 2019-12-06 07:53:07
I'm using a PanGestureRecognizer and in the UIGestureRecognizerStateChanged I let a view on the screen be moved by the users finger. I'm using that for a Tinder like swipe away gesture and I now want to limit the movement of the view to either the horizontal axis or the vertical axis, whatever direction the user started to swipe. I've been searching up and down but didn't find anything suitable here. Is there any clever way to limit the axis movement, based on which direction the user started to swipe the view? Thanks a bunch! Update: Here's the current code that moves the view: - (void

jquery touch swipe over iframe

让人想犯罪 __ 提交于 2019-12-06 07:28:05
问题 I am trying to put together a small application where i can swipe anywhere on the screen. This was all ok until I wanted to add an iframe to a section of the page. I want to be able to be able to know when a swipe has occured when people are over this area. Is this possible? So an idea where #box is the swipeable area <div id="box"> <div id="left"> <h1></h1> <p> this is some text</p> </div> <div id="right"> <iframe src="anyurl" frameborder="0" height="430"></iframe> </div> I have put together

Detect diagonal swipe gestures in a UIView

℡╲_俬逩灬. 提交于 2019-12-06 05:48:35
问题 I want to detect a two-finger diagonal swipe that starts from the bottom right of the screen to the middle. I tried adding UISwipeGestureRecognizer with direction set as "UISwipeGestureRecognizerDirectionUp | UISwipeGestureRecognizerDirectionLeft" but to no vail as the handler is getting invoked even if I start the swipe from the middle of the screen to the top left. Do I need to sub-class UIGestureRecognizer or can I handle this using touchesBegan and touchesMoved ? 回答1: You need to subclass

Firing twice when swipeleft and swiperight in jquery mobile?

喜你入骨 提交于 2019-12-06 04:46:41
I am new to jQuery mobile. I am using the swipe concept for swiping multiple separate html pages. It's working correctly when I come from swipepage3 to swipepage2. swipepage2 to swipepage1 and swipepage2 to swipepage3, It's firing twice. How to fix this issue? Here is my code: Swipepage1.html <!DOCTYPE html> <html> <head> <title>Share QR</title> <meta name="viewport" content="width=device-width,height=device-height,minimum-scale=1,maximum-scale=1"/> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" /> <script src="http://code.jquery.com/jquery-1.9.1

Swipe to change views

ぃ、小莉子 提交于 2019-12-06 03:17:39
问题 Is the following easy to code? I have a tableview and when the user selects a cell a detail view is loaded. I want to allow the user to navigate throughout the items/detail-view representing the items in the tableview by left and right swipes, working in the same way as e.g. the home-screen of the iphone (e.g. while swiping, one page is moving off the screen and the next appears). I have seen this implemented in the MobileRSS-APP, so it is possible, but I just have a hard-time figuring out

Prevent JQuery Mobile swipe event over specific element

耗尽温柔 提交于 2019-12-06 01:54:33
问题 I am using jquery mobile and I need to prevent swipe event over specific element. Need of doing this is because I am using slider and I don't want the swipe event to be invoked resp. I want it to be prevented when user is manipulating with slider. I was not able to too find any solution so I am asking for help here. This is my javascript code: $( document ).on( "pageinit", "#demo-page", function() { $( document ).on( "swipeleft swiperight", "#demo-page", function( e ) { // We check if there

android swipe Horizontal View Paging with MapView

坚强是说给别人听的谎言 提交于 2019-12-06 01:44:31
I have an android app with a view that contains 3 pages between which the user can navigate through swiping his finger (to the left or to the right - Horizontal View Paging). I downloaded “android.support.v4.view.ViewPager” and found the way to implement the swiping part mostly thanks to this tutorial here: http://mobile.tutsplus.com/tutorials/android/android-user-interface-design-horizontal-view-paging/ My problem is that I want one of my views to launch a MapView. But to launch a MapView I need an activity that extends the MapActivity. If I have all my “RecordAdapter” class in a MapActivity

-[NSResponder swipeWithEvent:] not called

拜拜、爱过 提交于 2019-12-05 22:36:22
问题 I am writing an application targeting OS X Lion and Snow Leopard. I have a view that I want to have respond to swipe events. My understanding is that three-finger swipes will call -[NSResponder swipeWithEvent:] if that method is implemented in my custom view. I have already looked at this question and corresponding answers, and tried the following modified stub implementation of Oscar Del Ben's code: @implementation TestView - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame

swiper的使用

心已入冬 提交于 2019-12-05 19:00:02
swipe是一款轮播图插件,我是用在vue里面,方便省事儿。 swipe里面有很多关于滑动的组建,我只用过轮播图,如果以后有时间,可以再看看官网上别的组件介绍。 官网地址 github地址 安装: npm install vue-swipe 安装完成之后,我没有在main.js中注册它,而是在使用页面注册的。因为通常来说轮播图只会在一个应用的首页展示,所以就没必要在全局注册它,只用在index.vue页面注册使用一下就可以了。 如何使用: //html <swipe class="carousel-figure"> <swipe-item class="slide1">1</swipe-item> <swipe-item class="slide2">2</swipe-item> <swipe-item class="slide3">3</swipe-item> </swipe> //js //顶部引用 import { Swipe, SwipeItem } from 'vue-swipe' import 'vue-swipe/dist/vue-swipe.css'; //注册局部组建 components: { Swipe,SwipeItem } //css .carousel-figure { height: 150px; //必须得给个高度,不然高度是0,啥都不显示

jquery mobile Panel Swipe function causing errors

独自空忆成欢 提交于 2019-12-05 14:17:13
I'm having such a hard time, I have a flip clock using mootools, then a weather widget using Yahoo API, now I have no idea what is causing "cannot call methods on panel prior to initialization; attempted to call method 'open'" SO i followed this demo, http://view.jquerymobile.com/master/docs/examples/panels/panel-swipe-open.php#demo-page and now i'm getting the error. $( document ).on( "pageinit", "#demo-page", function() { $( document ).on( "swipeleft swiperight", "#demo-page", function( e ) { // We check if there is no open panel on the page because otherwise // a swipe to close the left