Questions tagged [uitouch]

UITouch is a class from UIKit framework in Apple iOS. A UITouch object represents the presence or movement of a finger on the screen for a particular event.

A UITouch object includes methods for accessing the view or window in which the touch occurred and for obtaining the location of the touch in a specific view or window. it also lets you find out when the touch occurred, whether the user tapped more than once, whether the finger is swiped (and if so, in which direction), and the phase of a touch—that is, whether it began, moved, or ended the gesture, or whether it was canceled.

A UITouch object is persistent throughout a multi-touch sequence. You should never retain an UITouch object when handling an event. If you need to keep information about a touch from one phase to another, you should copy that information from the UITouch object.

666 questions
4
votes
2 answers

Cocoa-Touch: How to find out if CGPoint is in a certain CGRect?

I was wondering if there is a simple way to find out if a certain point is in a certain CGRect? I have this to get the position of where the user touched the screen: UITouch *touch = [touches anyObject]; CGPoint currentPosition = [touch…
n.evermind
  • 11,944
  • 19
  • 78
  • 122
4
votes
2 answers

Nested UITableViews: a way to scroll both the outer vertical UITableView and a child horizontal UITableView at the same time?

When you're working with an atypical nested UITableViews setup - where you have an outer vertical UITableView that hosts 90° rotated UITableViews (see: Looking for a UI library to present Data horizontaly in iOS ): is there a way to make iOS process…
magma
  • 8,432
  • 1
  • 35
  • 33
4
votes
1 answer

Passing Touch Events

I have a working UIButton in my view controller's view. I have a UIView instance on top of the button (I'll refer to it as topView) in the same view controller's view. If a condition is met I am forwarding all of the touch events (began, moved,…
Jeshua Lacock
  • 5,730
  • 1
  • 28
  • 58
4
votes
1 answer

I want To track The Speed Of the fingure movement in pixel Per Second Is It Possible Any WaY?

I want to track The speed Of the Touch moved in pixel /Second Any Budy Having idea For This Except the PanGesture Method
NIKHIL
  • 2,719
  • 1
  • 26
  • 50
4
votes
1 answer

UIView: Inheriting Touch

Example 1: When invoking 3D Touch on app icon, you are able to make selections without lifting the finger up. Example 2 Long pressing on a keyboard key allowing you to drag in to different selections without lifting finger up. If the app icon is…
Gizmodo
  • 3,151
  • 7
  • 45
  • 92
4
votes
1 answer

Preventing unhandled touch events on a child view controller from passing through to container view

I have a container view controller managing its own full-screen content view, with several gesture recognizers attached. A child view controller can be overlaid over a portion of the screen; its root view is a UIView providing the opaque background…
4bar
  • 531
  • 2
  • 14
4
votes
2 answers

UIKit collection view, strange behavior (accessing/scrolling cells)

So I recently implemented a collection view in my app, and I got a bug that I can't seem to solve, searched it and saw no threads about it. If I have my cursor/finger over the cells i can't scroll through my collection view i need select a "empty"…
Adrien Zier
  • 687
  • 1
  • 7
  • 28
4
votes
1 answer

UITouch not releasing view

I have a custom view which is not being deallocated. I dismiss controller on close button pressed. Now if I only press the button the view is deallocated alright. But If press button with one finger with other finger touching the view its not…
Sajad Khan
  • 512
  • 1
  • 6
  • 15
4
votes
1 answer

How to activate a UIGestureRecognizer with touches already on screen?

I have implemented a few interactive UIViewController presentation animations with a UIPanGestureRecognizer, like panning up to present a view controller. What I'm trying to do now is allow this behavior to continue through one of the view…
4
votes
2 answers

SpriteKit - touchesMoved not called often enough - fast movement

Im programming a SpriteKit based game in Swift. The SKScene contains a SKSpriteNode which contains SKShapeNodes. One of those shapes is the "player". The user should be able to drag and drop the player. I implemented different methods to get this…
4
votes
1 answer

Get complete Touch Area/Space on the screen IOS

Is there any way to find the touched area/space in the screen (e.g, if you kept your thumb on the screen it needs to return the frame area covered by thumb)?
Anand
  • 2,086
  • 2
  • 26
  • 44
4
votes
0 answers

When using hitTest:withEvent method - decide if tap was initiated

I'm trying to override hitTest:withEvent in a custom view. This is a container view with many subviews. Attached to this "superView" is a gesture recognizer. On top of this view sit many subviews (which in turn have more and more subviews) I decided…
Avba
  • 14,822
  • 20
  • 92
  • 192
4
votes
3 answers

how to check UIView and UIImageView is touched or not in iphone sdk?

I have One UIView and one Draggable UIImageView. Background color of UIView is green. When I will drag the image, UIImageView will touch UIView. When I drag the image over UIView the colour of UIView should become red. How to check that UIImageView…
Nisha Singh
  • 143
  • 4
  • 12
4
votes
5 answers

UIScrollView Will not allow scrolling or interaction after rotated

In my -(void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration; method, I have code to reposition and resize a scrollview as the app rotates with the device. I do it with the…
Matt
  • 2,920
  • 6
  • 23
  • 33
4
votes
3 answers

Touch and drag a UIButton around, but don't trigger it when releasing the finger

I'm trying to allow some UIButton instances on one of my views to be touched and dragged around the screen (eventually with momentum, but that's for later!). I have this working in a very simple form, shown below, but the problem is that by touching…
Luke
  • 9,512
  • 15
  • 82
  • 146