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

How to detect someone tapping outside of a UIImageView

I have a UIImageView that is added as a subview. It shows up when a button is pressed. When someone taps outside of the UIImageView in any part of the application, I want the UIImageView to go away. @interface SomeMasterViewController :…
finneycanhelp
  • 9,018
  • 12
  • 53
  • 77
3
votes
2 answers

How to find when a tableView cell is touched or pinched in iphone?

I have a tableView completed fill on view. when i tapped on a cell tableView:didSelectRowAtIndexPath: is getting fired, but when i wrote touchesBegan:withEvent to find touch and Pinch events of a tableView it was not fired. Tableview is above the…
User-1070892
  • 929
  • 10
  • 16
3
votes
3 answers

Detecting all touches in an app

In an iPad app, wherever a user is touching the screen I want to display an image, highlighting the points they are touching. The app contains a number of nested views, all of which should receive touches and behave normally. Seems simple, but I've…
Anthony Mattox
  • 7,048
  • 6
  • 43
  • 59
3
votes
1 answer

Call another object's touches begin iOS

Lets say I have view1 which is intercepting touch events and view2 which is not. Can view1 pass those events to view2 and call [view2 touchesBegin] [view2 touchesMoved]...etc?
Joe
  • 659
  • 1
  • 8
  • 17
3
votes
1 answer

iOS 4. UITouch's locationInView doesn't acknowledge retina display. Bug or feature?

Is there a reason that UITouch's locationInView: is unaware of the presence (or not) of a retina display? Why is the rescaling for retina display left as a task for the developer. Seems odd to me. Thanks, Doug
dugla
  • 12,774
  • 26
  • 88
  • 136
3
votes
1 answer

Is it possible to simulate UITouch on UIWebView?

I want to generate touch and then transmit to UIWebView. Is it possible? I don't want use any private SDK.
Voloda2
  • 12,359
  • 18
  • 80
  • 130
3
votes
0 answers

Send UIEvent from iOS device UIView to external screen UIView

I'm working on an app using AirPlay and I need a way to have touches on the main screen act as touches on the UI on my external screen in order to be compatible with a large number of previously existing custom UI elements. Rebuilding the UI…
Kyle Olson
  • 116
  • 6
3
votes
1 answer

Subclassing UIPanGestureRecognizer to wait for Condition before recognition

I'm trying to link two gestures one after another. UILongPressGestureRecognizer, then UIPanGestureRecognizer. I want to detect the Long Press, then allow the Pan gesture to be recognized. I've Subclassed UIPanGestureRecognizer and Added an…
scooter133
  • 1,297
  • 1
  • 15
  • 29
3
votes
1 answer

Get touch type in hitTest() or pointInside()

I'm implementing a passThroughView by creating a transparent View on top and override hitTest(). passThroughView should consume touches from Apple Pencil and if touch type is not from pencil, it pass touches to the view underneath. The problems…
Brew Master
  • 457
  • 3
  • 13
3
votes
1 answer

inches between points iPhone

I need to calculate the distance, in inches, between two touches on any iOS device. Is there a way to get convert pixels to inches in the iOS sdk? This needs to work if you install it on any device and even if you install an iPhone app on an…
madmik3
  • 6,975
  • 3
  • 38
  • 60
3
votes
3 answers

Keep two MKMapViews showing the same region

On my iPad app, I have 2 mapViews that are the same size displayed next to each other. I want these to always show the same area. I achieve this now using the regionDidChangeAnimated: delegate method. This does not always work that great…
Ross Kimes
  • 1,234
  • 1
  • 12
  • 34
3
votes
3 answers

Smooth rotation of UIView with touch

I'm wondering how to smooth a UITouch in my code. I am able to detect the UItouch on my UIView, but when I try to rotate the view using CGAffineTransform, it does not rotate smoothly. I have to press or long finger touch on iPhone for this kind of…
JKMania
  • 239
  • 1
  • 6
  • 17
3
votes
3 answers

detecting the [UITouch view] in touchesMoved method

I wish to drag from one subview to another within my application (and connect them with a line), and so I need to keep track of the current view being touched by the user. I thought that I could achieve this by simply calling [UITouch view] in the…
Matt Carr
  • 413
  • 5
  • 15
3
votes
1 answer

is WKCompositingView blocking touches?

I have a WKWebView that I would like to handle touches but I just can't find the right method. webView is created programmatically in viewDidLoad, and loads fine. override func viewDidLoad() { super.viewDidLoad() let site =…
Chameleon
  • 1,608
  • 3
  • 21
  • 39
3
votes
1 answer

Pass touch events to one of multiple options

I've created a board of UIImageViews, that are held within a single object as an NSArray. all the imageviews are displayed as subviews of the 'board'(the object that holds the array). What I would like to do is when I touch any of the individual…
Ben
  • 169
  • 1
  • 2
  • 8