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

Darkroom

Guest
Original poster
during development of my app i ran into problem and i'm not sure if it's a bug or not.

basically i've reserved the right for the entire view to detect touches, and store the CGPoint of the first touch, that would allow for proper resizing of an object with a drag. on the screen there is a UISlider that wouldn't detect a first touch point if the point was on the tracks of the slider (not the slider's thumb to actually use the slider). i thought this was fine, no problem, until i realized that eventhough the slider's tracks didn't allow for touchesBegan method, they did allow for touchesMoved and touchesEnded! this causes major problems with my app, as a first touch point was required for the touchesMoved or touchesEnded methods to work properly, otherwise some very strange things happened.

in the end i was able to code the touchesMoved and touchesEnded methods to only work if there actually did exist a first touch point (which, by the way, clears itself on touchesEnded).

so why does the UISlider tracks detect touchesMoved and touchesEnded but not touchesBegan? attached is a demo app so you can see for yourself.
 

Attachments

Register on MacRumors! This sidebar will go away, and you'll see fewer ads.