Questions tagged [uilongpressgesturerecogni]

145 questions
19
votes
7 answers

Combining a UILongPressGestureRecognizer with a UIPanGestureRecognizer

I d'like to combine a UILongPressGestureRecognizer with a UIPanGestureRecognizer. The UIPanGestureRecognizer should start with a long press. Is there a simple way to do this? or do I really have to write my own gesture recognizer? I wan't something…
7
votes
3 answers

Swift Custom keyboard - show extra letters pop-up on keyboard long press?

I have a custom keyboard extension in my app which is developed using swift. They keyboard works fine. I wanted to add the functionality of showing a pop-up with extra characters when long-press on a keyboard button like the default iOS keyboard.…
6
votes
5 answers

Handle long press on a single UITabBarItem

I use the long press gesture on a tab bar. But I only need the long press gesture for one particular tab bar item. How can I solve this problem? Could I customize the long press gesture in tab bar?
5
votes
2 answers

Disable didSelectRowAtIndexPath on Long press gesture on Tableview Cell

I have been trying to setup a long press gesture recognizer on UITableView. The gesture is working fine, but i want to disable the didSelectRowAtIndexPath delegate function of UITableView when Long Press gesture is recognised. In short, if user…
Mr. Bean
  • 3,512
  • 1
  • 16
  • 34
4
votes
1 answer

UILongPressGestureRecognizer in Swift 3

I am new to Swift 3 and wanted to create a little To-Do-List. But in viewDidLoad the App always crashes, because of the UILongPressGestureRecognizer. I searched in the internet, but I found no working solution. Here's my code and everytime it says…
Jan
  • 61
  • 2
  • 6
4
votes
1 answer

How to enable long press gesture on table cell in xamarin.ios?

I am working on Xamarin.iOS. I need that when I long press on a UITableCell of a UITableView a specific menu pop up in the form of UIActionSheet. I have tried using the sources at Xamarin official website but I failed. Have anyone done this before?
theMAMs
  • 83
  • 1
  • 13
4
votes
4 answers

Magnifying glass shows UIWindow behind

We have an app with a burger menu navigation, the menu itself is a window that lies behind the keywindow. When the user long presses a uitextfield and brings up the magnifying glass, the magnifying glass shows the content of the UIWindow behind.…
4
votes
0 answers

Touch events not sent to a new view added with addSubview

I have an area of my screen on which I want to recognize a long press. I use a UILongPressGestureRecognizer. Once the long press event happens, I show a custom UIView that has a touchesMoved method, by adding it as a subview. This custom UIView is…
rafalio
  • 3,668
  • 4
  • 27
  • 29
3
votes
0 answers

UITapGesture for Button are working. But, long press gesture for the same are not working

I have a table view with X number of rows. One of the row has collection view inside it. Collection view has Y number of cells. Every cell has a button. Now, the problem is; If I apply a tap gesture for button inside the collection view cell it…
3
votes
1 answer

wkwebview decidePolicyForNavigationAction being call after the long press recogniser ended

I tried to override the original wkwebview actionsheet... Firstly I disabled the original wkactionsheet by webView.evaluateJavaScript("document.body.style.webkitTouchCallout='none';", completionHandler: nil) Then I initialise a long…
3
votes
1 answer

Swift : Animate CALayer

In the code below I am trying to animate a CALayer from the left side of the screen to the right side of the screen as the user is holding down on the screen (longPressGestureRecognizer). When the user lifts their finger, the CALayer pauses. var l =…
3
votes
1 answer

Getting snapshot for some cells isn't working

I want to get snapshot for cell after long press and I get it working. I am creating snapshots by this code: func customSnapShotFrom(view:UIView) -> UIView { // calling this with UITableViewCell input let snapshot:UIView =…
Libor Zapletal
  • 12,142
  • 18
  • 79
  • 165
3
votes
1 answer

Long press gesture recognizer issue

In Interface Builder, I've added a press gesture recognizer to a MKMapView. An event is sent after 1 second (I am using it to add a pin to the map). I have checked the "Cancel touches in view" behavior of my gesture recognizer, but my issue is…
Trevör
  • 2,531
  • 1
  • 21
  • 55
2
votes
0 answers

UILongPressGestureRecognizer in IOS 13 second long press two times on MKMapView not work

I have set up a UILongPressGestureRecognizer that works fine in versions before IOS 13, but in this version to detect the second long press, I have to press twice. That is to say: 1º LongPress -> Work Fine show "long tap" 2º LongPress -> Not work 3º…
ja12
  • 312
  • 2
  • 14
2
votes
0 answers

UILongPressGestureRecognizer does not detect back-to-back long presses

I have created a simple Swift application to test out the UILongPressGestureRecognizer. The app shows the world map (MKMapView) onto the screen where the user can long press on the map and I simply print out the number of times the user has long…
1
2 3
9 10