Questions tagged [touchescancelled]

Use this tag for questions related to touchesCancelled:withEvent, a UIResponder event-handling method in the UIKit framework and MonoTouch.UIKit Namespace.

touchesCancelled:withEvent: is a UIResponder event-handling method in the UIKit framework and MonoTouch.UIKit Namespace that is triggered when a touch event is cancelled.

Along with touchesBegan:withEvent:, touchesEnded:withEvent:, and touchesMoved:withEvent:, it is one of the primary touch event-handling methods.

Syntax Examples

func touchesCancelled(_ touches: Set<UITouch>?,
     withEvent event: UIEvent?)

- (void)touchesCancelled:(NSSet<UITouch *> *)touches
        withEvent:(UIEvent *)event

[MonoTouch.Foundation.Export("touchesCancelled:withEvent:")]
public virtual Void TouchesCancelled (NSSet touches, UIEvent evt)

Resources

Related Tags

17 questions
58
votes
7 answers

UIButton touch is delayed when in UIScrollView

I'm running into a small issue in my app. I essentially have a series of UIButtons added as subviews in a UIScrollView which is part of a nib. Every time I tap on a button there is a noticeable delay before the button is highlighted. I essentially…
Jeff
  • 2,818
  • 3
  • 29
  • 31
9
votes
4 answers

How to avoid Touches cancelled event?

I have two views one beneath the another. I'm rotating the below view by touch sensing of top view. while trying to make a swipe, touches canceled event is called before touches ended event. While moving the finger touches began and touches moved…
Ka-rocks
  • 774
  • 1
  • 14
  • 27
5
votes
1 answer

What is the touches canceled event, and how is it different from touches ended

I just don't understand what apple means by the touches canceled event and how is it called.
Jab
  • 26,853
  • 21
  • 75
  • 114
4
votes
3 answers

Querying current number of touches on screen without using events on iPhone

I have an application that starts playing a sound when user touches the uiview and changing to different tones as the user slides the finger on the screen. The sound stops when the user lifts the finger. I am using the touchesBegan, Moved and Ended…
Nikhil Mathew
  • 687
  • 7
  • 17
2
votes
1 answer

Getting ResultCode Result.Canceled OnActivityResult of activity in google sign in + xamarin.android

In my current project, one of my team member implemented google sign-in in Xamarin.Android app. He has added keystore and sha for release also. And it is working fine in his machine in debug mode. But when I try to run this code from my machine I…
Neelam Prajapati
  • 3,764
  • 3
  • 28
  • 62
1
vote
0 answers

touchesCancelled triggered when using three fingers

I have a simple app that prints the coordinates of all the touches event. In the simulator it works great. On my device (iPhone) it works great with up to two fingers. When I tap with three fingers in a fast sequence the event touchesCancelled is…
Ugo B
  • 11
  • 2
1
vote
2 answers

Touches should cancel function for UITableView is not called

I have a table view that has a UIImage and some UIButton objects in each TableView cell. When I scroll the table view, it works quite well overall. However, if I touch one of the UIButton items to scroll the table view, the UIButton seems to steal…
1
vote
2 answers

When does a iOS touches method (Cancelled & Ended) called?

I'm trying to write a program using UIBezierPath and touches Methods. I am confused by two touches method: - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; - (void)touchesEnded:(NSSet *)touches…
31i45
  • 315
  • 1
  • 2
  • 12
0
votes
1 answer

Detect palm touching/releasing the iphone screen

Implementing a sort of 'distress call' button which should work as following: User starts application and covers a screen with a palm of a hand Some time passes, user may introduce additional touches during that time or remove some of the existing…
0
votes
2 answers

iPhone - Detecting touches and canceling them?

I am dtecting touches on my UIView. Is some situations I want to be abel to cancel touches so that touchesEnded won't get called. But doesn't matter what touchesEnded will always get called? - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent…
aryaxt
  • 76,198
  • 92
  • 293
  • 442
0
votes
1 answer

iOS: not getting touchesCancelled when getting a native popup

I'm not used to working on native iOS code. So excuse me for missing something obvious here. The issue I'm having right now, is when a user is holding down a touch, and then before releasing, a native popup appears (low battery, timer, ...), this…
Sascha
  • 1
  • 3
0
votes
1 answer

Cancel onTouchEvent when GestureDetector's onDoubleTap triggers

A View for freehand writing implements onTouchEvent for the drawing operations. Besides, a GestureDetector recognises double tap events to wipe the drawing. However, when the double tap occurs, onTouchEvent triggers an ACTION_UP, which draws an…
vitil
  • 256
  • 1
  • 3
  • 13
0
votes
1 answer

Implement touch cancel on UIButton

I have a subclassed UIButton that I made into an irregular shape (Parallelogram) where I override the touch events so it will only accept touch events inside the shape How can I implement a touch event like a normal UIButton where I can cancel a…
SleepNot
  • 2,982
  • 10
  • 43
  • 72
0
votes
1 answer

call "touches-cancelled" method in Xcode

I add a button as spriteNode to a scene, and i want to run an action when the touch cancelled. I add a "touches-cancelled" method and write an "NSLog" to test if this method is called. After I run my project, there is no output showing this method…
Tongyue
  • 23
  • 5
0
votes
0 answers

Touch Events touchesCancelled and touchesEnded

I have a project that I started out using a tap gesture recognizer for. I realized I didn't have enough control with the tap gesture recognizer, so I've started coding with using my viewcontroller as a UIGestureRecognizerDelegate. Just to make sure…
Victor Engel
  • 2,037
  • 2
  • 25
  • 46
1
2