touchesbegan

problem in quartz 2D drawing touches began

I have drawn 5 circles in in my app one above the other . But i want to perform different operations when i touch each circle and there is only one touches began where I can perform touches for the entire view.. can anyone help me how to do that. ...

UIImageView touchesBegan don't exist variables

Hi, here is the situation: 1.I have viewControler and in method viewDidLoad i created subview and add it to a this view. 2.My subView (UIImageView) colled Kvadrat and in method. Here i am cooling my other class and here method. -(void) setKorpa: (Korpa *)k { mKorpa = k; NSLog (@"Number of elements in array = %i", [[mKorpa vratiSveKv...

How can I load a view based on how long I hold a UIButton?

Hello all, I've searched the net and documentation, but haven't found anything quite like what I'm trying to do. I'm working on an app where I want to load one view if a UIButton is held for x seconds, another if it's held for x+y seconds, etc. I found this tutorial. The problem I'm running into is, how do I switch the length of the but...

How do you tell what object is being touched in touchesBegan?

I know that this is a very commonly asked question, but all of the answers on every website don't work! If you still don't know what I mean, then maybe this line of code will help you understand. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; CGPoint location...

UITableView selection as in iPhone Voice Memos app

I am trying to recreate the selection behaviour as seen in the built in iPhone Voice Memo App. That is, in the voice memo list view, when the user selects an item, and there is already another item selected, the touch down doesn't select the cell immediately, but on touch up the previously selected cell is deselected and the new cell is...

Increase frequency calls of touchesMoved

Hi Everyone, Is there a way to increase the frequency calls of touchesMoved than the default? I need more calls of it to draw a smooth circle. It gets called not too frequent by default and so I get an edgy circle. Is there a way to tweek the frequency of touchesMoved calls? Thanks ...

touchesEnded not being called??? or randomly being called

If I lift my finger up off the first touch, then it will recognize the next touch just fine. It's only when I hold my first touch down continuously and then try and touch a different area with a different finger at the same time. It will then incorrectly register that second touch as being from the first touch again. Update It has som...

Error message when trying to insert method into touchesBegan

I am trying to create a new method within my TapDetectingImageView file and it's giving me a warning that it cannot find the method even though I have it declared in the .h file. The specific three warnings all point to the @end line in the .m file when I build it and they say: "Incomplete implementation of class 'TapDetectingImageView'...

How to ask UIImageView if MultipleTouchEnabled is "YES"

I have created a few UIImageViews programmatically, but I have a feeling that even though I setMultipleTouchEnabled to YES during the setup, it is not getting set properly and it's leading to multi-touch issues. My question is, within touchesBegan how do I go about asking the UIImageView that was touched if it has MultipleTouchEnabled o...

iPhone multitouch - Some touches dispatch touchesBegan: but not touchesMoved:

I'm developing a multitouch application. One touch is expected to move, and I need to track its position. For all other touches, I need to track their beginnings and endings, but their movement is less critical. Sometimes, when 3 or more touches are active, my UIView does not receive touchesMoved: events for the moving touch. This probl...

Cocos2D TouchesEnded not allowing me to access sprites?

Hey Guys! Thanks so much for reading! - (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch * touch = [touches anyObject]; CGPoint location = [[CCDirector sharedDirector] convertToGL: [touch locationInView:touch.view]]; CGRect myRect = CGRectMake(100, 120, 75, 113); int tjx = sprite.position.x; ...

Really strange behavior when trying to implement touch events

I'm working on my first iPhone application, and I'm getting some very strange behavior when I try to implement touch events. I set up touchesBegan:withEvent: and its sister methods under a subclass of UIViewController, but they aren't registering. What's even weirder is that when I try using touches on the simulator while running the c...

iPhone Touch View and Sub ImageViews

Hi, I have a UIView (mainview), including 50 UIImageViews (image1 .. 50)) (all are set to clickable (UIVIEW and also UIImageViews) Now to test if one of my images is touched I do in 'touchesbegan': touch = [[event allTouches] anyObject]; if ([touch view] == image1) { NSLog (@"image1 clicked"); } But when i test on if my "mainview...

Modal views and touchesBegan

This question is a follow on from the following: http://stackoverflow.com/questions/3235967/uitouch-event-not-responding I done more research and I know what the problem is, but I don't know how to solve it or even if it can be solved. I may have to take a new approach. I have a RootViewController and from this I load a second ViewCon...

iPad Simulator not receiving touch events outside of iPhone's 320x480 frame

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject]; gestureStartPoint = [touch locationInView:self.view]; NSLog(@"test x:%f",gestureStartPoint.x); NSLog(@"test y:%f",gestureStartPoint.y); etc.. Srangely, I'm not receiving any log statements if I click outside a 320x480 fra...

Handling touches on Iphone

Im having a little problem on handling touches in my apps. I set my touchesBegan like this: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *currentTouch = [[event allTouches] anyObject]; touchPoint = [currentTouch locationInView:self.view]; if (CGRectContainsPoint(image1.frame, touchPoint)) { ...

Get hit test event type

Hi, Is there a way to know if the hitTest:withEvent: method is being thrown because of a touchesBegan, touchesMoved or touchesEnded event? by now I only do: if([event type]==UIEventTypeTouches) { } but this is not exclusive enough ...

Handling touches

I have a UIView subclass with several subviews and I want to handle these events in the class: touchesBegan:withEvent: touchesMoved:withEvent: touchesEnded:withEvent: but I also want these event to be called at the subviews. How can I accomplish that? (I have already tried with hitTest, but I only get the touchesBegan event and no t...

Using Distance of two touches in real-time?

Hello, i want to receive the changed distance of two touches in my program after "pinching". First, i start with the touchesBegan: - (CGFloat)distanceBetweenTwoPoints:(CGPoint)fromPoint toPoint:(CGPoint)toPoint { float x = toPoint.x - fromPoint.x; float y = toPoint.y - fromPoint.y; return sqrt(x * x + y * y); } - (void)touchesBe...

TouchesBegan on specific object

hi all, I've been searching on google for that , but didn't found any answer. I want to use TouchesBegan but on a specific object, like a textview, a label, ... I've tried to replace "any object" by the pointer of my object but it doesn't work. Is there on other way to detect the touch on a object with a method , in witch I can tell a...