Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
i have an image that resizes based on the touches began and touches moved methods. in order for smooth resizing of the image, touchesBegan has to send it's touch location to touchesMoved.

these touch methods can happen anywhere on the screen, which also hosts a UISlider. the problem is that the right and left tracks of the slider do not detect touchesBegan, but will detect touchesMoved.

how can i either make the UISlider detect touchesBegan, or also ignore touchesMoved?
 

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
oh, there it is... the answer, once again, is discovered after i post for help.

i simply ask if there is a CGPoint firstTouchPoint in the touchesMoved method, and then reset the firstTouchPoint on touchesEnded:

Code:
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
	{
	if (firstTouchPoint.x != CGPointZero.x)
...

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
	{
	firstTouchPoint = CGPointZero;
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.