touches

iPhone: touches on UIViewController

I have a UIViewController, on top I put an UIImageView, then a UIScrollView. I can process touches on the UIScrollView just fine, however I want to process certain touches on the UIViewController. I only need touches on the UIScrollView that are held for 5 seconds (This part works fine). Anything less than that I want to pass to the UI...

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 I've seen on the web regarding how to do this has been sketchy at best. I figured it out...

Core Animation: Issue with touches after animation

Hi I am facing a problem in touch handling after the layer has animated. I have a CALayer called a “wheel” and it contains sublayers on which I have to detect touches and move the wheel. here is my code for wheel animation -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { // Get the touch point UITouch *touch = [touc...

Converting beginTouches and endTouches to ccBeginTouch and ccEndTouch

I'm converting the game I'm working on from UIkit to coocos2d. Using UIKIT I would use the code below code to pass the touch evens to a method. What would be the equivalent in Cocos2d? - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { // Save the position for (UITouch *touch in touches) { // Send to th...

UIButton touch is delayed when in UIScrollView

Hi All, I'm running into a small issue in my app. I essentially have a series of UIButtons added as subviews in a scrollview which is part of a nib. Every time I tap on a button there is a noticeable delay before the button is highlighted. I essentially have to hold it for about half a second before the button dims and appears selected...

iPhone 4: Touches works on simulator but not on device

I'm developing a universal application, I actually tested in on: iPad: Simulator OK - Device OK iPhone 3G: Simulator OK - Device OK iPhone 3GS: Simulator OK - Device OK iPhone 4: Simulator OK - Device NOT working the application don't respond to any touch input, I tried to put some breakpoints into touchBegun,touchMoves,touchEn...

When the user has two fingers on the screen and lifts one I want nothing to happen.

enough is enough. like the title says, I'm in a bit of a pickle. so here's the outline of my problem. I have this ship right. It rests in the center bottom of the screen (240,0). When the user touches to the right at a point greater than 240 the ship moves right. And left if the user touches at a point less than 240. HOWEVER this is gr...

touches in landscape and portrait orientations

Hi all, i am developing a game for iPad, on Portrait and landscape orientations. i am taking touches on four corners of the screen, touches is working properly on landscape mode, where as in Portrait mode actual problem, touches working on top corners but bottom corners touches is not working. i think in portrait mode the view frame s...

Get frontmost subview

I know UIView's hitTest:withEvent: method digs down to the far-most view that gets the touch event, but how would you get the opposite result? The first view to get an event at a certain CGPoint? EDIT As zem pointed out, that hitTest method returns the farthest descendent in the view hierarchy. In my case, I have a mapView with a bunch ...

How to create and draw a visual swipe gesture...

I'd like to try implementing a visual swipe for an iPhone project, like they do in some games, like Fruit Ninja. As you drag your finger around the screen, it leaves a trail that disappears after a while. I would think that you could have a fixed number of points in the "chain" and as new points are added to the front, old ones are rem...

[ObjC] Custom UIImageVIew with touchesEnded works only with the first view

Hi! Sorry for bad title :( I've a controller that has a scrollview where I display some other views, in this case an IngredientImage, that is a subclass of uiimageview: #import "IngredientImage.h" @implementation IngredientImage - (id) initWithImage:(UIImage *)image { if (self = [super initWithImage:image]) { } [self...

[btn1 addsubview:view1], now btn1 cant handle touches

Hi there, im 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? ...