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
0
votes
1 answer

How to drag an image view after applying CGAffineTransformMakeRotation

I am developing an app, Which has feature that dragging and rotating the image view. I have implemented to drag and rotate successfully by using below code In touchesBegan Method - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent…
thavasidurai
  • 1,972
  • 1
  • 26
  • 51
0
votes
2 answers

Dragging a tableview cell that contains uibuttons

I'm trying to implement a uitableview that its rows can be dragged to right and left (and show something behind them). The code works fine, I've implemented it using the following methods: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent…
Code Monkey
  • 968
  • 1
  • 14
  • 26
0
votes
1 answer

How can I stop a moving object when it hits the frame?

I'm doing a simple game which user can throw one of the bottles against the status bar on the top and break it. I'm using touchesMoved to test if a user catch a bottle(UIView) and it will be thrown responding to the user's finger flicking direction.…
Walter
  • 21
  • 5
0
votes
1 answer

iOS - touchesMoved called only once in subclassed UIScrollView

I am trying to drop movable UIImageViews within a subclassed UIScrollView so that I can drag them around my UIScrollView. I subclassed UISCrollView and the dropping behavior is working, but when I try to drag the images, touchesMoved is only…
0
votes
1 answer

iOS touchesBegan issue

I have an NSArray whit 15 UIImageViews: @interface ViewController : UIViewController{ NSArray *ArrayImages1; NSArray *ArrayImages2; } in viewDidLoad: ArrayImages1 = [[NSArray alloc] initWithObjects: a1, a2, a3, a4, a5, a6, a7, a8, a9,…
0
votes
1 answer

Please put me on the right track with Drag Drop on IOS

I am creating a bit of a video mash up app (like imovie) and the first function I am tackling is the ability to drag a thumbnail from a video library and drop it on a time line. I was able to add the drag code to the video thumbnail class so when…
box86rowh
  • 3,415
  • 2
  • 26
  • 37
0
votes
1 answer

Detect objects, touchesmoved and UITouch

I have a UIView on where i add balls with a ID. When i touch the ball with the ID 1 i draw a dashed line follows my finger. The problem if when i move the finger to the other balls, i don't know how to detect these balls and check the ID they have.…
murb83
  • 325
  • 3
  • 14
0
votes
1 answer

How can I stop views on screen from multiplying? (touchesBegan,touchesMoved,touchesEnded)

I am new to Objective C and I am trying to make a basic puzzle game. I am using multiple UIImage objects, some labels and a button. It consists in moving the pieces to its correct position. If the user fails to put a piece in a place, the piece goes…
paqolp
  • 1
  • 2
0
votes
1 answer

Touches Moved CAEmitterLayer delayed in dinstance after touch point...

I stumbled from one problem to another one: Solving the first problem, now my particle trail is delayed way behind the touch position when a finger moves over the screen. it worked great when I was initialising the CAEmitterLayer by overwriting +…
headkit
  • 3,307
  • 4
  • 53
  • 99
0
votes
1 answer

How to enable touchesMoved() with button action?

I am doing one piano application. There i am using button action to play music. But its not supporting drag functionalities. I have used touchesMoved(),touchBegan() methods also . But nothigh is working.Can anyone help me, please?
deepti
  • 206
  • 2
  • 15
0
votes
1 answer

Setting boundary conditions for object to traverse a path through dragging the object

I am developing an application in which there is one object which is draggable.The user can drag this object in a specified path, not outside the path. For achieving this I had to set the boundary conditions so that if the touch point is beyond that…
Gypsa
  • 11,230
  • 6
  • 44
  • 82
0
votes
2 answers

need UIButton inside custom UIView respond to touches

I have a custom UIView with some buttons as subviews. I am using touchesBegan/Moved/Ended to rotate the view with the user's finger. The problem is, when I try to drag/rotate the view from a button, the touches methods aren't called. I need the…
coder
  • 10,460
  • 17
  • 72
  • 125
0
votes
0 answers

How to constrain touches to specific aspect ratio?

I need to draw a selection rectangle to specific aspect ratios (square, 4x3, 5x7, 8x10, etc) so I can crop the image. I've got some pretty normal code that handles dragging the 4 corners of the rectangle freely inside touchesBegan/Moved, but I'm…
pizzafilms
  • 3,829
  • 4
  • 24
  • 39
-1
votes
2 answers

Swift - Newbie question. Passing variable values between different files, functions and views

newbie swift programmer here that needs help with something that probably is trivial... This is in different File, different View: class CanvasContainerView: UIView { override func touchesMoved(_ touches: Set, with event: UIEvent?) { …
-1
votes
1 answer

touchesMoved get all the coordinates swiping fast

I want to get all the coordinates in touchesMoved. The problem I am facing is when you swipe fast on my view than touchesMoved is missing few coordinates from the swipe. I have referred this question too. touchesMoved:withEvent Any solution for…
Janak Nirmal
  • 22,706
  • 18
  • 63
  • 99
1 2 3
16
17