SVSegmentedControl icon indicating copy to clipboard operation
SVSegmentedControl copied to clipboard

Drag problem in Facebook layout type.

Open mimmo00 opened this issue 12 years ago • 5 comments

Hi, first of all, congratulations for the wonderful uicontrol. I've used several times your switch, no problem. But now I have implemented it in a Facebook layout type, a draggable view. When move the thumb, arrives in the middle and come back. With a single touch does work.

You know how to solve this problem?

Thanks man

mimmo00 avatar Apr 08 '13 22:04 mimmo00

It's hard to visualize the problem you're describing. Can you post a video describing the issue? That would help.

samvermette avatar Apr 09 '13 03:04 samvermette

Hi, sure. Sorry for the mess inside the view: P

http://d.pr/v/7DVM

mimmo00 avatar Apr 09 '13 08:04 mimmo00

Nice implementation of SVSegmentedControl...

It looks like the touch is getting cancelled somehow. Don't really have the time to recreate your setup, but here are a few clues:

  • Have a look at the Tracking in SVSegmentedControl.m
  • Add breakpoints to see what's going on.
  • Another thought is that the segmented control drag gets cancelled by the facebook layout type view. Just like a UITableView will cancel the touch of a cell when you drag it by enough pixels. Perhaps there's a similar property, like canCancelContentTouches on the facebook layout class?

samvermette avatar Apr 10 '13 20:04 samvermette

Thanks, tried to experiment and let you know. I have only one doubt, I do not think the problem is in the layout, because I have other uicontrol inside, and do not have this problem.

mimmo00 avatar Apr 12 '13 13:04 mimmo00

You're right, if there's no problem with your UISwitch then there shouldn't be a problem with SVSegmentedControl. It's probably something in one of the tracking methods then...

samvermette avatar Apr 12 '13 23:04 samvermette