uitouch

Modifying, coloring and dragging pre-existing images iPhone application

Hi, I am developing an iphone application which would let me modify the image by dragging other images over its top along with functionality that would let me choose a specific color from the image and replace it with some other color shades i choose. If anyone has some clue like how to actually implement it or some code, that would be ...

multiple uiimageview touch

hi guys, I am just trying to plan a new app... I want to have a series of images which a user can drag around the screen and drop where they want. I'm thinking that I will have an array (NSMutableArray) of all the images. when the app loads, it will draw these out to a scrollable UIView... then the app will know which a user has presse...

Is there any way at all that I can tell how hard the screen is being pressed

I want to find the pressure of the touch. I just don't know how to accomplish that result with out jailbreaking it and getting the raw touch data. Does anyone know How I would do this? ...

Get all touches without UIEvent

I'm looking for a way to get all the current touches even if no event has occurred. I know about [UIEvent allTouches] but I need to be able to see "these are all the touches on the screen" even if none of them has changed. It seems like it should be possible because allTouches can access touches which haven't been updated, so the phone i...

Use a UIScrollView with 3 touches not one.

I wanted to know If there is some way I could use three touches with a UIScrollView. What I want in the end is to have the UIScrollView only be passed one UITouch (or at least think it it has only one touch), but have three touches down. I want to use the let's just say the middle finger or find the average (x , y) of the three touches a...

UIScrollView Touches override

I want to know how I would stop my sublass o UIScrollView is not working properly: - (void) touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view { if ([touches count] == 2) { [super touchesShouldBegin:[touches anyObject] withEvent:event inContentView:view]; } else { //...

Is there a class / method to handle dragging views?

Hi all, I found a useful tutorial to get started in understanding how to Cocoa handles touch events. I've used this as a base to create a custom script, I'm trying to make a UIView draggable, very similar to the native Maps application. I've written a custom script, using the touchesBegan method it will capture where the input began ...

Comparing a UITouch location to UIImageView rectangle

I have the following code to determine if a touch is within an image view in my table cell. However, it doesn't work. I compared the two with CGRectContainsPoint however, it doesn't work. Here is the code: -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { // Declare the touch and get it's location UITouch ...

How to call a method only once during -(void)touchesMoved ?

Hi, I am using - (void) touchesMoved to do stuff when ever I enter a specific frame, in this case the area of a button. My problem is, I only want it to do stuff when I enter the frame - not when I am moving my finger inside the frame. Does anyone know how I can call my methods only once while I am inside the frame, and still allow m...

How would I make an app that would smudge selected pixels of a UIImage/UIImageView

I have a UIImageView that I want to manipulate within the touchesMoved method that smudges pixels around the UITouch passed in the set. I want it to act like the smudge tool in Photoshop and be fast. (I do know that even the hotoshop one is a little laggy but I want it to be as fast as possible) I have almost no knowledge of CGContext or...

How can a disabled button gets touches ?

Hello all, I was just wondering how can this happen !! In my iPhone application during a http request loading I am disabling a button in the navigation bar . But when I am touches the button three or four times the action method gets called after the loading is completed this means that though the button is disabled the touches are de...

Using UITouch inside a UIScrollView

Hi all, Just toying with the SDK and I was wondering if possible a UITouch event can work inside a UIScrollView. I have setup a UIScrollView which handles a large UIView, inside the UIView is a UIImageView, I've managed to get the UITouch to drag the UIImageView outside of the UIScrollView but inside it's not registering the event. I ...

How can I detect a touch on an animated subview ? Or click an animated UIButton?

I have a view that is moving. The view is sometimes on and sometimes off screen - it is twice the width of the screen. In this view, there are buttons that I need to be able to click. I've tried doing this in many ways already - using pure buttons using touches began on UIView I'm doing the animation using a CGPath in core animation ...

iPhone "touchesBegan" and "touchesMoved" message ... do not move to centre of touch

I am modifying the "MoveMe" example from the apple web site. When my controller gets the "touchesMoved" message it moves the object being moved to the centre of the touch, because (pseudocode) object.center = touch.center. How can I store the offset of the initial touch so that if I start the touch/drag to the side my finger will stay on...

Handling touches in UITableViewController

I want to implement the handling of an additional swipe gesture in my UITableViewController. However, it seems that in the case of tableviews the usual touch handling methods like -[touchesBegan::] of the controller are not called. How can I handle touches on a UITableView? ...

Not receiving touchesEnded/Moved/Cancelled after adding subView

Title more or less says it all. In response to a touchesBegan event, my UIViewController recolours itself and adds some subviews. It never receives the touchesEnded. I guess because the added subviews are somehow intercepting the event. I tried calling resignFirstResponder on the subviews to no avail. The code works fine when I don...

Cancel UITouch Events When View Covered By Modal UIViewController

Hi there, I am writing an application where the user has to move some stuff on the screen using his fingers and drop them. To do this, I am using the touchesBegan,touchesEnded... function of each view that has to be moved. The problem is that sometimes the views are covered by a view displayed using the [UIViewController presentModalVi...

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

iPhone - how to track touches and allow button taps at the same time?

I'm wondering how to track touches anywhere on the iPhone screen and still have UIButtons respond to taps. I subclassed a UIView, made it full screen and the highest view in the hierarchy, and overrode its pointInside:withEvent method. If I return YES, I'm able to track touches anywhere on the screen but the buttons don't respond (likel...

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