uiswipegesturerecognizer

switching view controllers using swipe gestures

霸气de小男生 提交于 2019-12-30 06:21:54
问题 Okay so here is the problem I'm running into: I am attempting to switch from one viewController that I named MenuViewController which contains my menu (obviously). I have a separate viewController named ViewController that contains my mapView . I would like to be able to double finger swipe left from my MenuViewController over to my mapView . I'm not exactly sure where to start. Also, I am using xib files, and not the storyboard. Running iOS 6. 回答1: UISwipeGestureRecognizer *swipeLeftGesture=

Swipe vertical gesture not working with UITableView

孤街醉人 提交于 2019-12-29 08:03:09
问题 I have UIViewController and I have added a UITableView to it in the storyboard, later I added a swipe Up gesture recognizer to the view, but nothing happened. this is my code import UIKit class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, UIGestureRecognizerDelegate { @IBOutlet weak var tableview: UITableView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. let swipeRegongnizer =

SKSpriteNode erratic swipe?

落爺英雄遲暮 提交于 2019-12-22 12:39:43
问题 I have created the following sprite kit node : SKSpriteNode *megadeth; megadeth = [SKSpriteNode spriteNodeWithImageNamed:@"megadeth_rocks.png"]; megadeth.name = @"awesome"; and added the swipe gesture as follows: -(void)didMoveToView:(SKView *)view{ UISwipeGestureRecognizer *recognizerUp = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeUp:)]; recognizerUp.direction = UISwipeGestureRecognizerDirectionUp; [[self view] addGestureRecognizer:recognizerUp];

Swipe Gesture Recognition Inside UIWebView

天大地大妈咪最大 提交于 2019-12-22 05:49:14
问题 I have read a bunch of questions on this but none of them seem to achieve what I am looking for... So lets say I have an arbitrary UIWebView inside of a UIViewController . The UIViewController has a SwipeGestureRecognizer that works fine. It even works within the UIWebView -- whenever there is no scrollbar. (Before I load a page or even if I load a page that can fit appropriately within the size of my UIWebView ). However, if I load a webpage that requires horizontal scrolling left or right,

Xcode: How do I change UIPageControl value with swipe gesture?

耗尽温柔 提交于 2019-12-19 03:15:38
问题 I have a quick question I was hoping you guys could help me answer. Right now I have a UIPageControl in a storyboard which changes an image depending on what dot you are on, however, as of now you have to press on the dot to change through the dots/images, how can I change through the images/dots by swiping? Here is my code for my .h #import <UIKit/UIKit.h> @interface PageViewController : UIViewController @property (strong, nonatomic) IBOutlet UIImageView *dssview; - (IBAction)changephoto:

Slide through view controllers but not with the UISwipeGestureRecognizer

空扰寡人 提交于 2019-12-14 02:13:15
问题 Here is my issue, i got 5 view controllers and i can switch between them trough swipe with the UISwipeGestureRecognizer class and xcode's storyboard. So this works, but, i dont like the slide effect. I like to make it in a way so you can exactly slide the view to another by dragging it. Can anyone send me in the right direction? I searched on the internet but i cant find any functions or tutorial on how to do this. Thanks in advance! Edit: Im not looking the scroll view. Because this will

Do I have to use a UIPanGestureRecognizer instead of a UISwipeGestureRecognizer if I want to track the movement?

天大地大妈咪最大 提交于 2019-12-13 04:59:04
问题 I'm trying to implement a paging interaction for one of my views. I thought I would just use UISwipeGestureRecognizers . But through trial and error as well as examination of the documentation it appears that A swipe is a discrete gesture, and thus the associated action message is sent only once per gesture. So while I could trigger the page, I wouldn't be able to hook up animation that occurred during the drag. Is my only alternative to use a UIPanGestureRecognizer and reimplement the basic

Couldn't get UISwipeGestureRecognizer direction correctly

怎甘沉沦 提交于 2019-12-12 09:48:50
问题 I'm writing code to move my two fingers up or down on a view to change some status. The code as below: UISwipeGestureRecognizer *aSwipeGesture = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeGesture:)]; [aSwipeGesture setDirection:UISwipeGestureRecognizerDirectionUp | UISwipeGestureRecognizerDirectionDown]; aSwipeGesture.numberOfTouchesRequired = 2; [self.View addGestureRecognizer:aSwipeGesture]; - (void)swipeGesture:(UISwipeGestureRecognizer *)sender { NSLog(@

NSArray returning NULL value even though right number of objects is counted and returned

一世执手 提交于 2019-12-12 04:25:25
问题 I have created a NSArray that contains images objects. Based on the swipe direction recognized by UISwipeGestureRecognizerDirection the index is incremented up or down so the right image could be selected. The problem I have is that my NSArray is returning a NULL value instead of the image object. Therefore the UIImageView (named imageView) displays nothing. I am printing an NSLog statement in order to see what is really happening - example below: ... [2307:60b] Swiped and the index is: 1,

Prefer swipe to delete over a competing swipe gesture

天大地大妈咪最大 提交于 2019-12-12 03:23:20
问题 So I have a tableViewController inside a XLPagerTabStrip view controller, basically a pod which allows me to swipe between child view controllers left and right. The problem is that I want to disable the view controller scroll when the user swipes on a cell on my tableView. In this case I want him to be able to see the delete option, instead of changing the viewController itself. Is this possible? Currently, I see the delete button only if I swipe really, really fast and in all other