Questions tagged [touches]

231 questions
3
votes
3 answers

Swift detect touch in both left and right side of screen simultaneously

I've been able to detect if the user is touching the left or right side of the screen and then perform a function. I'm trying to detect if both sides of the screen are being touched simultaneously and if so perform another function. This is what I…
Alex Ingram
  • 434
  • 4
  • 17
3
votes
1 answer

SpriteKit origination and angle of gesture

I am very new to SpriteKit, so apologies for a beginner's question. I have two objects from which a user can swipe into direction of a "target". I need to determine the origination point (that is from which of two objects the touch was originated)…
Alex
  • 303
  • 1
  • 9
3
votes
0 answers

tvOS touchesBegan, touchesMoved, touchesEnded

I am confused on how touches trickle upwards to parent views. To test I built a simple program that has 4 UIButtons. The Button class sends the touch events upwards: import UIKit class ViewController: UIViewController { override func…
Jim
  • 181
  • 2
  • 9
3
votes
0 answers

jquery nicescroll couldn't make cursor-drag on touch devices

Is it possible to scroll by dragging cursor (handle - in other words) on touch devices? Now it is scrolled only when I touching list, and cursor seems to be disabled.
IvanZh
  • 2,265
  • 1
  • 18
  • 26
3
votes
0 answers

touchesBegan not being called over a UIbutton

The touchBegan method is not being called over my UIButton. I want both the UIButton and the touchesBegan method to share the touch. Is that possible? Right now when I click the button, only the button method is being called and it seems to…
3
votes
1 answer

Is it possible to make the upper layer recognize a kind of gesture while passing other kinds to lower layer?

I am working on an iPad application where the user can place several editable text boxes on a canvas. Each text box should be able to be moved by dragging it around with one finger. The user can rotate the selected text box using two fingers. I…
3
votes
2 answers

UIScrollView not responding to touches

I have an UIScrollView in which I display tweets. The scrollView is contained in a stack of views, the last of which has 4 gesture recognizers. The scrollView is populated as follows: - (void) createTimeLine:(NSArray*)timeline { CGRect rect =…
3
votes
0 answers

iOS touches entered from outside UIView

I'm trying to build a virtual piano keyboard for iOS. One of the biggest problem's I'm having is how to handle touches that start outside a UIView and then enter it. Since the touchesBegan is being called on another view, I can't figure out how to…
chmod
  • 1,173
  • 1
  • 9
  • 17
3
votes
0 answers

touchesBegan not called in a UIView subclass

I am trying to mimic the GLPaint app and I have a TDPaintingView that has methods for -(void)touchesBegan... as well touchesMoved, touchesEnded, and touchesCanceled. However, I am not seeing any of them fire. I have a TDAppDelegate that is hooked up…
tacos_tacos_tacos
  • 10,277
  • 11
  • 73
  • 126
2
votes
2 answers

How to disable touch on a CGRect / Sprite after one touch

How can I disable touches for a CCRect / sprite after it has been touched? I have in my init method to set the sprite: [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"testAtlas_default.plist"]; sceneSpriteBatchNode…
rizzlerazzle
  • 125
  • 1
  • 8
2
votes
2 answers

Resizing uiview from its corners

How to resize the uiview using touches on the corners of the uiview. For e.g. it top left corner is touched and dragged upwards its y coordinate and height should increase, if bottom right corner is dragged then its origin should be same but height…
Prerna chavan
  • 3,179
  • 7
  • 35
  • 77
2
votes
1 answer

Capturing touches in UIWebView

Having trouble capturing touch events in UIWebView. Want to be able to sense touches on words on scrolling HTML page for the purpose of inserting hyperlinks into the HTML [which I fully control] at the point of touch. Obviously some existing agent…
Frank Natoli
  • 153
  • 1
  • 1
  • 12
2
votes
1 answer

iPad not all screen recognising touches

So my current app project is a camera based app and all is going well so far but I have run in to a weird little issue and don't know if there's something basic i'm missing or if it's something more complex. When I run my app on the iPad in…
Matthew Hallatt
  • 1,310
  • 12
  • 24
2
votes
1 answer

Dragging the imageview by means of touches

My App deals with an imageview and I want to drag the image all over the view by means of touches. -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { // This gets you starting position of UITouch *touch = [ [ event allTouches ]…
Icoder
  • 330
  • 3
  • 25
2
votes
2 answers

how to achieve same flinging results on android & iphone

I ported a game from iPhone to android. All OpenGL based, and exactly the same calculations for scrolling. I noticed that on the iPhone when scrolling through the game I can scroll faster, and the starting speed as I lifted my finger felt the same…
over_optimistic
  • 1,399
  • 2
  • 18
  • 27
1 2
3
15 16