Questions tagged [touchesended]

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

touchesEnded:withEvent: is a UIResponder event-handling method in the UIKit framework and MonoTouch.UIKit Namespace that is triggered when one or more fingers are removed from the screen.

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

Syntax Examples

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

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

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

Resources

Related Tags

32 questions
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
1
vote
2 answers

How would I switch between images in Swift?

I have this image of a car in the middle of my screen. So when I press on the screen I want it to change from the car to a plane image and when I let go of the screen I want it to go back to the car image. The code I have now keeps spawning the…
coding22
  • 689
  • 1
  • 7
  • 28
1
vote
1 answer

UIButton Subclass: Calling [super touchesEnded:] After Custom Animations Have Completed

I have a UIButton subclass that does some custom drawing and animations. That is all working fine and dandy. However, most of my buttons dismiss the current view via their superview calling [self dismissViewControllerAnimated] once it is confirmed…
paulmrest
  • 414
  • 4
  • 14
1
vote
1 answer

How to implement touchesEnded in a UIScrollView or equivalent

I'm writing a swift iOS app with a paging scroll view. I have a label on the bottom which I intend to update the text of depending on the current page. I'm fine to sort the current page code, but does anybody know how to implement a method to fire…
Matt Spoon
  • 2,760
  • 5
  • 25
  • 41
1
vote
2 answers

Resizable Centered Circular UIView

I am looking for a way to create a CIRCULAR UIView that is resizable and stays centered (see image). The CIRCULAR view in this example is a UIView subclass WCSDailyGoal. ContainerView.m - (void)createDailyGoalView { _dailyGoalView =…
WrightsCS
  • 50,551
  • 22
  • 134
  • 186
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
1 answer

line disagreeing when touch end when drawing line

My swift code goal is to just draw lines on a image view. Right now when you pick up your hand from the image view the drawing disapers. When your hand is pressed down it works its just when your hand or point is released nothing is saved. I don't…
joe buck
  • 31
  • 1
  • 7
0
votes
0 answers

iOS: Problem with my drawing popover that doesn't display well since iOS13

I display a popover that's allows to draw inside. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { mouseSwiped = NO; UITouch *touch = [touches anyObject]; lastPoint = [touch locationInView:self.view]; } -…
ΩlostA
  • 2,501
  • 5
  • 27
  • 63
0
votes
2 answers

How to detect if iOS UIViewController is being interacted with or touched

I have a specific UIViewController for which I want to block the idleTimer processing done by iOS. I know that I can set: UIApplication.shared.isIdleTimerDisabled = true However, I want to be able to set a timer to re-enable the normal system idle…
zkon
  • 568
  • 1
  • 6
  • 19
0
votes
1 answer

How to get the UIView object at the location of UITouch from - (void)touchesEnded:withEvent:?

I want to get the object at the location of where the touch is lifted (off the screen). This will be used to implement a drag-and-drop and I have these methods for overriding: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent…
0
votes
1 answer

touchesEnded called when any part of the screen is tapped with 2 fingers at the same time

I've found this strangest behavior with touch event. The targeting view is not even allocated yet touchesEnded will get called by tapping any part of the screen with 2 fingers not 1, must be 2... then it skips touchesBegan, call touchesEnded. I even…
durazno
  • 559
  • 2
  • 7
  • 25
0
votes
1 answer

swift syntax deleting an image with UITouch

This is basically the code I am trying to spawn images or enemies with and I want to delete them but not all at once by touch only one of the same images that was touched. The image is moving too in case any one needs to know. import…
0
votes
1 answer

How to enable/disable touchesMoved, touchesEnded and Swipe Gestures

I am working on a game where I need touchesMoved and touchesEnded but after the stage is completed, I want to DISABLE touchesMoved and touchesEnded and enable only SWIPE GESTURES. So how can I achieve this? When the game is being played: I want…
0
votes
1 answer

Why does location not appear in touchesEnded?

I'm looking for the final position of touchesEnded. My touchesBegan code looks like this: override func touchesBegan(touches: Set, withEvent event: UIEvent?) { if let touch = touches.first { touchStart =…
0
votes
1 answer

How to make a sprite move on touchesEnd?

Here is a video I recorded with the problem visually https://www.youtube.com/watch?v=AC-4c4Qcyeo&feature=youtu.be Currently facing a bug after when tocuhesMoved drag line path is completed I want the sprite to move to the position that the last…
NWBDevelopment
  • 103
  • 1
  • 1
  • 7