touches

iPhone UITextField - Show Magnify Callout Programatically

I have created a subclass of UITextField that stores a number. By overriding touchesMoved: I have created the functionality so sliding left and right on the UITextField changes the number value. What I would like is to programmatically display a magnifying glass over the UITextField- similar to the one Apple provides when editing the t...

Handling touches during animation on iPhone

I have a view with multiple controls inside (a picker, a switch, a slider...). I use an animation to move this view; it appears from bottom and goes up until it disappear by the top. I can't get the inside controls respond to touches while the view is moving. How can I catch those touches? ...

How to use drag and drop within a UIScrollView

I am trying to drag and drop UIViews within a UIScrollView. I'd like the UIScrollView to scroll if I drag a UIView so that it intersects the top or bottom of the ScrollView. If it touches the top, it should scroll up. If it touches the bottom, it should scroll down. Once the UIView is moved such that it is no longer intersecting the top ...

Touch and Drag from one view to another

Hi all! I've search for some clues on this problem without much success. Hope someone can kick me in the right direction. I am prototyping a couple of apps where I need to design my own GUI. The GUI is made up by two separated UIViews where one of them contains a small thumb of an image. I want to be able to drag this thumb from the fi...

touchesEnded Sound?

I'm trying to play a sound on touchesEnded but I'm having a problem. There are multiple objects that get moved around, so if the below code holds true when any object is moved, it constantly plays the sound. How do I only play it once? -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ if(CGRectContainsRect([image1 ...

UITabbar without controller

Hello. I have a simple app where the only view controller has an outlet to a UITabBar. It also implements UITabBarDelegate and is set as the delegate for the UITabBar: @interface TheMainViewController : UIViewController <UITabBarDelegate> { IBOutlet UITabBar *theTabBar; } I implemented the following method Which gets called wh...

How To Detect "Touch Down" in superview of UIScrollView?

I have a UIView that contains a UIScrollView and I want to be able to capture the "Touch Down" event in the UIView any time the user taps on the UIScrollView. I've tried including all the touchesBegan/Ended/Cancelled handlers in my UIViewController but none of them get fired when tapping inside the UIScrollView contained in the main UIV...

Miss a single tap randomly

I have the following code snippets - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; NSUInteger numberTaps = [touch tapCount]; // Tapping if (numberTaps > 0) { // do something } ... The above code basically detects a single tap on a small image (width...

Touch event missing when pushing new view

Hello, I am new in iPhone programming. At the moment I am trying to recognize a constant touch. For example I want the user to leave his finger on the screen for the whole application. I use a navigationcontroller which holds the different views. If the user now touches the screen in view1 and then the view is changed to view2 by pushin...

Is there a way to make Android tabs slide?

Hi all, I'm new to Android development, and I was wondering if anyone knew either how to make Tabs slide, or how to get a similar effect without tabs. I have quite a few tabs in my application, and it does not look good on devices with smaller screens. Or maybe tabs are not what I am looking for. If you don't know what I'm talking about...

Add double tap action (presentModalViewController) to UISCOLLVIEW

I have been wrestling this issue for a while now and cannot seem to get the following "touchesEnded" method to execute within a UISCROLLVIEW. I have read on many of the forums that UISCROLLVIEW will take control of all touch events unless it is subclassed, but I cannot seem to get the code right (still new to the SDK). Basically I have...

touchesBegan for UITable's Cell

How can I use touchesbegan in a table's cell without having to subclass a whole cell. Something like addTarget..... which is available for a UIButton? (in vb.net this would be like AddHandler I think) ...

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; ...

subview take touch event on all window

Hello, i have a little problem on my view. I have a uiviewControler, load a xib. on this view i have a UIButton ( on touch it's work fine) I add a subview create by code (on a different class ) this view respond to her touch event. when i add this subview on my view, the event on this view are ok, but the UIButton on my first uiview n...

iPhone + OpenGL + Touches: FPS drop

Hey there, Recently I ran into a very strange issue: touching the screen of the iPhone and moving a finger around can eat up to 50% of my FPS. Yeah, I checked my code for possible bottlenecks – not the issue. The last resort I tried before writing this post – commenting out all the touch processing code and looking at FPS then. Results ...

UIImageView subclass not passing touches to controller subviews.

When I add a UIImageView subclass (fullscreen) behind a couple of UIButton subclass instances, those buttons stop receiving the touches and don't function anymore. Nothing I have tried has worked to restore their connectivity to user touches. I have tried: a) Using a UIImageView subclass for the front view (that receives the touches) an...

Annotation in UIWebview in iphone sdk

Hello all, I need help for, scribbling on the webpage i.e where ever the user moves on the uiwebview there it should draw a line according to the touch moves. Is this possible. Can any one please help me in this. Thanks, Mrudula. ...

Scrollview+Webview Touch event

hi i have a scroll view and on that number of webview no i want to know how i get touch event of webview ...

Cocos2d touches snap sprites if move one over another

Hi I'm having problem with touch events. I have a class (Inheritance from CCLayer) that return some sprites with touches events. I have around 10 of this same class with different sprites. Kind like a domino. The problem is that if I move the sprites I have defined on this class over another, they snap to each other. My .h file: @...

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...