Help with Swift dragging code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Help with Swift dragging code

I have this dragging code, it "drags" my image fine, but it ALSO "warps" my image to the position I touch. How can I make the image ONLY drag and not warp? override function touchedMoved(_ touches: Set<UITouch>, with event: UIEvent?) { for touch in touches { let location = touch.location(in: self) Image.position.x = location.x Image.position.y = location.y } } Sorry I am very new to Swift

12th Mar 2019, 2:09 AM
Cory Mckay
Cory Mckay - avatar
1 Answer
+ 1
You should google search this complex question
24th Mar 2019, 5:11 AM
Mind To Machine 💻🕆
Mind To Machine 💻🕆 - avatar