uigesturerecognizer

Change UITableViewCell height touch up inside

六眼飞鱼酱① 提交于 2020-01-06 20:35:41
问题 As the title says, I'd like to make my cells dynamically change height. I try to be as clear that I can. When I touch up inside a cell (prototype cell), the cell change height (from 44 to 88);in the cell there is an UIImage (88px height) partially hidden and where the cell is hidden there is view, touching up starts a segue to a second tableView; when I touch up inside an other cell the previous cell return to 44px height an this other cell change height as the previous one. Follow a scheme

UILongPressGestureRecognizer not working on UITextField

与世无争的帅哥 提交于 2020-01-06 08:19:08
问题 I have a LongPress gesture recognizer initialized in the viewDidLoad method of my viewcontroller as below: longPressGesture_= [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(displayTimeFlagCallout)]; I have a tableview in my viewcontroller. The tableview has custom cells. Each cell has 2 textfields. I want to bring up a custom popover when a user long presses on the text fields (startTime and endTime). I do not want the magnifying glass and the Copy/Paste popover to

Use Pan Recognizer to Control ScrollView

本小妞迷上赌 提交于 2020-01-06 07:17:48
问题 I have a scrollView with paging enables. I have a UIView as a subview of the scrollView. When the scrollView reaches the buttom of it's content, I'm turning scrolling off: scrollView.scrollEnabled = false because I'm doing other things that require dragging in a part of the scrollView (Yellow part). So the scrollViews offset locks at the buttom of the page. I want to be able to drag in the UIView (red), to enable scrolling of the scrollView, and thereby change the scrollviews content offset.

Not Detecting Tap on image view

ぃ、小莉子 提交于 2020-01-06 04:51:54
问题 I have an application in which i am calling image from URL in image view. Image view is add as subview of scroll view. In my implementation file i have use this code - (void)loadView { [super loadView]; // add gesture recognizers to the image view UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap:)]; UITapGestureRecognizer *doubleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleDoubleTap:)];

Pass touches on some part of UICollectionView to underlying views

心已入冬 提交于 2020-01-05 16:52:26
问题 First take a look at the attacthed image: My hiearchy looks as following: UIView UIButton UICollectionView UICollectionViewCell UICollectionViewCell UICollectionViewCell UICollectionViewCell UICollectionView is added to UIVew as H:[collectionView(==270)]| and V:|-(70)-[collectionView]-(70)-| . I have two requirements: 1) only the blue part of the UICollectionViewCell should trigger the collectionView::didSelectItemAtIndexPath: method. Which I have sucesfully implemented with - (UIView *

Disable gesture to pull down form/page sheet modal presentation

半世苍凉 提交于 2020-01-05 08:24:15
问题 In iOS 13 modal presentations using the form and page sheet style can be dismissed with a pan down gesture. This is problematic in one of my form sheets because the user draws into this box which interferes with the gesture. It pulls the screen down instead of drawing a vertical line. How can you disable the vertical swipe to dismiss gesture in a modal view controller presented as a sheet? Setting isModalInPresentation = true still allows the sheet to be pulled down, it just won't dismiss.

Can't Get Coordinates From MKMapView Using UILongTouchGestureRecognizer

ぐ巨炮叔叔 提交于 2020-01-05 07:38:16
问题 I'm using iOS 6, and I've read dozens of ways to accomplish this (including many from stack overflow) without success. Here's what I've tried, separated into "stages": Create a UILongTouchGestureRecognizer to receive long touches for the MKMapView . I've tried adding a UILongTouchGestureRecognizer via my Storyboard, and hooking up the outlets, delegates, etc. through the Connections Inspector. I've tried creating the UILongTouchGestureRecognizer programmatically, initializing it using mapView

handle taps in two different points at a same time via UIGestureRecognizer

走远了吗. 提交于 2020-01-05 04:56:34
问题 I have two labels in two different positions, when both labels are tapped at the same time i want another label to show a success message. How do I accomplish this? I can recognize a single tap or double tap with one or more finger touches but this is a different scenario. Please help. I tried this, but it does not work. UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)]; tapRecognizer.numberOfTapsRequired = 1;

UITapGestureRecognizer not working for specific [UIView] array

孤街浪徒 提交于 2020-01-05 04:24:10
问题 I have the following piece of code. It's a third party library for a menu (named CarbonKit). When I try to select a specific segment (tab) and add a gesture recognizer, it doesn't work. Any ideas what I'm doing wrong? To be clear, I placed a breakpoint in the handleTap, it it doesn't even enter the function. override func viewDidLoad() { super.viewDidLoad() self.view.userInteractionEnabled = true let tgr : UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector

UIPinchGestureRecognizer's touch locations

假如想象 提交于 2020-01-05 03:29:24
问题 I want to implement zooming with pinch gesture in my iphone app. The problem is, in a method that gets called when the gesture is recognized I don't have access to the touch events themselves (so I can't really get their locationInView: ) and I would like to get it in order to center my zoom-in properly. In the UIPinchGestureRecognizer class definition there is a UITouch *_touches[2]; defined, but I can't access it from outside of the class. Is there anything I can do in order to get that