Questions tagged [touches]

231 questions
7
votes
1 answer

Multi-touch gesture in Sprite Kit

I'm working in Swift with Sprite-Kit using XCode 6, and I have many different nodes but for the moment I only manage to detect one finger and move one node at the same time. I want to know how could I manage to detect multiple fingers in order to…
Drakalex
  • 1,488
  • 3
  • 19
  • 39
5
votes
3 answers

touches methods not getting called on UIView placed inside a UIScrollView

I have a Custom Scroll View, subclassing UIScrollView. I have added a scroll view in my viewcontroller nib file and changed its class to CustomScrollView. Now, this custom scroll view (made from xib) is added as a subview on self.view. In this…
anshul
  • 846
  • 1
  • 14
  • 32
5
votes
7 answers

Disable touch events on certain areas of iPhone screen

I want to disable touches on all areas of the screen apart from a specific few points (e.g buttons). I.e. I don't want 'touchesBegan' to trigger at all when I tap anything other than a button. Calling self.view.userInteractionEnabled = NO; has…
Smikey
  • 8,106
  • 3
  • 46
  • 74
4
votes
3 answers

iOS. How Do Enable a Transparent Image to Pass Touches to a UIButton Below it?

For an iPad app I am writing I have a container UIView with two subview that are UIView subclasses: A UIImageView whose image has a portion of it cut away to reveal what is below it. A UIButton below the UIImageView that is revealed through the…
dugla
  • 12,774
  • 26
  • 88
  • 136
4
votes
5 answers

‘static‘ UIButton ontop UIScrollview?

I want to achieve a rather simple effect. A scrollView and a static button above it. So far not problem. Unfortunately a problem occurs if I want to scroll the view "trough" the button. So start dragging inside the button will effect the button, not…
danielreiser
  • 5,292
  • 5
  • 31
  • 43
4
votes
1 answer

Why does touchesBegan not fire when the number of touches changes?

For some reason my touchesBegan method doesn't seem to be responding correctly. If I touch the screen with two fingers, then lift one up and put it down again, touchesBegan gets called correctly. If I touch the screen with one finger, then add a…
Davido
  • 2,913
  • 24
  • 38
4
votes
1 answer

IOS: How to make a scrollview scroll only when touched outside of a subview?

I have a scrollView with a subview inside of it. I want any touch outside of the subview to make the scrollview scroll like it would in any other circumstance. But then when the touch is inside the subview I'd like no scroll to be registered (so I…
Lewis Black
  • 957
  • 2
  • 8
  • 22
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

My UIScrollView (containing some UIControls) doesn't scroll anymore in iOS 8

In my app I have made a calendar which basically consists in a UIScrollView containing some cells (custom UIControl) for each day, a top header containing some labels (Mon, Tue, Wed...), and obviously some separators (UIView of 1px…
Thomas Albert
  • 275
  • 1
  • 10
4
votes
2 answers

Splitting a view into 4 triangular areas and detecting touches (iOS and Cocos2d)

Is there an easy way to do the following? I want to split a view into 4 via two diagonal lines: So the upper triangle area will correspond to "up". The other 3 will correspond to "left", "down", "right" respectively. What would be the easiest or…
Michael
  • 1,477
  • 4
  • 18
  • 27
3
votes
3 answers

iPad Landscape messing up touches began

My app is only allowable in the landscape orientations, and it launches in landscape. Thus, the top left corner when the iPad is landscape is (0,0), so everything works fine. However, when I pick up "touchesBegan"...it isn't working properly. Only…
CodeGuy
  • 28,427
  • 76
  • 200
  • 317
3
votes
2 answers

IOS 5: UIScrollView not pass touches to nextResponder

I have a subclass of UIScrollView, and override all 4 Touches functions for it. In those Touches functions, [[self nextResponder] Touches...] and [super Touches...] are used to pass the touches events. Also I have a view controller in which I…
RockLanding
  • 41
  • 1
  • 4
3
votes
4 answers

Semi-piano app touch troubles with UIButtons

I am working on a semi-piano app with a diffrent keyboard-layout then a usual one. I created the view manually with UIButtons, My problem was I that I didn't know how to slide from a UIButton to another, I figured that out with addTarget with the…
user1055486
3
votes
1 answer

What is the best way to create a custom "tickle" UIGestureRecognizer?

I would like to create a custom UIGestureRecognizer for a "tickle"... in other words, detecting a swipeLeft followed by a swipeRight, twice, without lifting the finger. I know I can create it by starting from scratch with a custom gesture, but then…
3
votes
3 answers

Keyboard-like popup buttons, iOS

Imagine a normal keyboard (like English). When pressing and holding A for a while, a new menu with á, ä and other buttons popups up. And while still holding the first finger down on screen, you slide it on top of another of those buttons. As you…
Jonny
  • 15,955
  • 18
  • 111
  • 232
1
2
3
15 16