Questions tagged [touches]

231 questions
47
votes
1 answer

Tutorial on How to drag and drop item from UITableView to UITableView

I've been banging my head on this one for a while and I figured it out. I want to give back to the community since I've gotten a lot of help from this website :). I'm trying to copy an item from one UITableView to another UITableView and information…
mj_
  • 6,297
  • 7
  • 40
  • 80
29
votes
7 answers

Touch events on UITableView?

I have UIViewControllerand UITableView as child in the view, what I want to do is when I touch any row I am displaying a view at bottom. I want to hide that view if the user touch any where else then rows or the bottomView. The problem is when I…
Kapil Choubisa
  • 5,152
  • 9
  • 65
  • 100
26
votes
5 answers

Allow UIScrollView and its subviews to both respond to a touch

I want both my UIScrollView and its subviews to receive all touch events inside the subview. Each can respond in its own way. Alternatively, if tap gestures were forwarded to subviews, all would be well. A lot of people are struggling in this…
William Jockusch
  • 26,513
  • 49
  • 182
  • 323
20
votes
3 answers

How to make UIImageView automatically resize to the size of the image loaded

I have put an UIImageView control on my view with IB. The size of the control is just something I decided upon, pretty random size really What I want to do is the control to resize automatically whenever I set the image property to a new image. I…
Louis Shraga
  • 773
  • 1
  • 7
  • 26
19
votes
6 answers

How to draw a transparent stroke (or anyway clear part of an image) on the iPhone

I have a small app that allows the user to draw on the screen with the finger. I have a UIImageView where the user draws, by creating a CGContextRef and the various CG draw functions. I primarily draw strokes/lines with the function…
devguy
  • 2,336
  • 5
  • 27
  • 31
18
votes
1 answer

Adding UIView to UIButton subview prevents touch events

I'm trying to add a view as a button's subview like this (btn1 is a UIButton); [self.btn1 addSubview:view1]; After adding it, the button wont give any touch related events, the button works fine without this subview added. Any thoughts?
Nicolas
  • 189
  • 1
  • 6
16
votes
1 answer

How to enable "Show Touches" developer option from adb shell?

I need to show touches for a screenrecord to show a bug but don't want to navigate away into settings for fear that I'll lose my place and the bug will go away. Anyone know if it's possible to enable this feature from the adb shell and if so, what I…
Alives
  • 648
  • 5
  • 11
11
votes
1 answer

JS: How does event.touches property work?

I don't understand how to use the event.touches property. For example to get the number of fingers on a iPad/iPhone you should use event.touches.length Then why is this example code not working? $('.image').bind('touchstart', function(event) { …
Tina
  • 471
  • 2
  • 5
  • 15
11
votes
4 answers

UIView, how to determine when touches entered the view

It appears that all the touch methods of a UIView are only called if the touches began within the bounds of that view. Is there a way to have a view respond to a user who has touched outside the view, but then dragged his fingers into the view? In…
GendoIkari
  • 11,734
  • 6
  • 62
  • 104
9
votes
3 answers

Passthrough touches of 2 UIScrollViews

I have 2 descendants of UIScrollView I have a UITableView which displays data and i have a UICollectionView added above the UITableView view | - UITableView | - UICollectionView The UITableView can only scroll vertically and the…
Andy Jacobs
  • 15,187
  • 13
  • 60
  • 91
9
votes
1 answer

SpriteKit SKScene missing touchesEnded

I've noticed that touchesEnded don't always get delivered to an SKScene on multi touch. Depending on speed of removing fingers etc, I would permanently miss some of the touchesEnded. touchesCancelled is implemented and I added a custom UIView and…
Nuoji
  • 3,438
  • 2
  • 21
  • 35
9
votes
1 answer

make a foreground view click-through

I don't find the way to make this work. My application has 2 FrameLayouts with many child views (suppose ImageViews for simplicity), stacked one over the other. My problem is, I need the FrameLayout on TOP and ALL ITS CHILDREN to let touches pass…
rupps
  • 9,712
  • 4
  • 55
  • 95
9
votes
3 answers

Disable touches but not all user interaction on UITextField

I have a UITextField but I want to be in control of when it is focussed and when it is unfocussed. In order to achieve this I need to be able to block touch events on that text field. I know I could just put a button in front of it and manually do…
Thomas Clayson
  • 29,657
  • 26
  • 147
  • 224
7
votes
2 answers

iOS Touches (Auto) Offset on iPad

There is almost no information out there about this, so here is my problem: I'm working on a 2 player 'sit across from eachother' ipad game and the player who is on the opposite side has a hard time tapping buttons... because it appears that Apple…
cclogg
  • 709
  • 2
  • 7
  • 11
7
votes
3 answers

How to get a UIView under a UIScrollView to detect touches?

I have a UIScrollView ontop of my UIViewController recreating an effect like in the Gowalla iPhone app when you're on a spot's page. Under my scroll view I have a button that I want to be able to perform it's action even when the scroll view's…
jonahgrant
  • 394
  • 1
  • 5
  • 8
1
2 3
15 16