Questions tagged [touchesmoved]

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

touchesMoved:withEvent: is a UIResponder event-handling method in the UIKit framework and MonoTouch.UIKit Namespace that is triggered when one or more fingers moves on the screen.

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

Syntax Examples

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

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

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

Resources

Related Tags

246 questions
1
vote
1 answer

Eating a touch that began in one layer and preventing ccMoved calls (or touchesMoved)

Using Cocos2D to create a shoot-em-up bullet hell style game. One finger drags to move the ship and there are fire layers in the corner. From my main layer, I detect ccTouchesBegan, ccTouchesMoved and ccTouchesEnded. I pass a CGPoint into my logic…
quantumpotato
  • 9,637
  • 14
  • 70
  • 146
1
vote
0 answers

Custom graph with Core Graphics and choppy frame rate when calling touchesMoved

I am creating a custom graph inside a UIView within the drawRect method using core graphics. The problem I am having is moving that graph with the user dragging their finger. For example, if my graph has 500 points and the screen is only 320 pixels…
Submerged
  • 646
  • 1
  • 10
  • 16
1
vote
0 answers

How do I create movable labels on a UIView?

I am trying to create four touchable and movable labels on a UIView. When I touch a ifAnimaPart01 somehow they are all gathered in one location and I can not touch or move the other labels. Does anyone know why my four labels are acting this way? I…
erguvani
  • 81
  • 1
  • 3
  • 7
1
vote
1 answer

Return object to original position on TouchesEnded?

I am trying to do a very basic thing but I am new to this. Basically I have a screen with a 3 objects that can move around, I have implemented a method which I call when TouchesMoved happens - if object X moves over main object the object X will…
PokiTheKing
  • 69
  • 1
  • 5
1
vote
1 answer

How to convert the coordinates of one SpriteNode to another that is not a child or descendant

In my SpriteKit Scene I got the following setup: Several nodes with the name sourceNode are direct children of the scene. A node called targetNode is a child of another node called sectionNode, sectionNode is a child of the scene as well. self --> …
Marco Boerner
  • 1,243
  • 1
  • 11
  • 34
1
vote
1 answer

iOS touchesMoved forwarded only once by UIButton

My goal, having at the same time, both: a UIButton that handle an event (.touchDown) another view upper in the hierarchy (i.e.: super) that receives a touchBegan/Moved/Ended/Cancelled. I want that event because, I need the touch force and other…
itMaxence
  • 1,230
  • 16
  • 28
1
vote
1 answer

touchesMoved <-- I can only see the y point

Why can I only see the "y" component of nowPoint changing, ["x" component is always "0"] ?? - (void) touchesMoved: (NSSet *) touches withEvent: (UIEvent *) event { [super touchesMoved:touches withEvent:event]; CGPoint nowPoint = [[touches…
jdl
  • 6,151
  • 19
  • 83
  • 132
1
vote
1 answer

touchesMoved not registering location

Touchesmoved is not picking up the location of my cursor. I have this code: -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { CGPoint touchPoint = [[touches anyObject] locationInView:svEditView]; [((UIView *)[[svButtonsArray…
Andrew
  • 15,935
  • 28
  • 121
  • 203
1
vote
1 answer

How to support touch move across various objects?

I have some labels in my app like this... What i need to do is, when clicking on a label, just I'm showing label name in the bottom of the screen. It works fine while clicking on each cell separately. But i want to show the changes even the user…
Rajkanth
1
vote
1 answer

how to move the sprite when touch the screen and disable when I tap the screen

I'm making a game where I move a sprite across the screen, but if I tap on the screen it will move to that location and I only want it to move if I hold my finger on the screen so the sprite will follow my finger and it wouldn't teleport through my…
1
vote
0 answers

UIButton continue tracking even when out of bounds

I'm trying to track the touches on the button. But whenever the touch leaves the button frame, it stops tracking the touch all together. I've tried using: override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { let…
Henny Lee
  • 2,970
  • 3
  • 20
  • 37
1
vote
2 answers

Swift with Spritekit - Joystick with knob Tutorial

Im working on an SpriteKit Tutorial with Swift these days. I programmed Joystick with a knob, that can be moved everywhere within the joystick circle. Heres the relevant code snippet: for touch in touches { let position = touch.location(in:…
1zz0
  • 264
  • 3
  • 18
1
vote
1 answer

Sprite position not updating to where it is being moved to

Since I am working in spritekit, I decided not to use UIScrollview because from what I could tell it is difficult to implement. Instead, based on research online I decided to create an SKNode and add all of my sprites as children of the SKNode. From…
joey
  • 49
  • 7
1
vote
0 answers

TouchesMoved Lag with Pathfinding

I'm making a game where the player follows a touch. The game has obstacles and pathfinding, and I'm experiencing extreme lag with touches moved. Upon loading the game, everything works, but after a few seconds of dragging my finger around…
mdamkani
  • 305
  • 2
  • 12
1
vote
1 answer

Swift SpriteKit: TouchesMoved doesn't update when finger stops and camera

I have a game where the player moves to a touch (and updates destination if touch moves). Everything works perfectly until the camera moves while the touch is not moving (the finger is resting on the screen so neither touchMoved nor touchesEnded is…
mdamkani
  • 305
  • 2
  • 12