Well, theoretically he shouldn’t select if you’re performing a scrolling motion on his UIScrollView
. Before anything else, make sure that the UISegmentedControl
really is inside the UIScrollView
and not underneath or above.
Another thing you can do to try to solve this problem, which will work depending on your overall scenario UIViewController
, is set the property exclusiveTouch
of UISegmentedControl
for NO
. This way the touch will also be passed on to the UIScrollView
that will continue allowing the scrolling movement.
If none of this works for you, one solution that can be used is to disable the UISegmentedControl
as long as the UIScrollView
is being moved. To apply such a solution you need to sign the delegate of UIScrollView
(UIScrollViewDelegate
) and implement the desired methods (start and end of scrolling). Just set the property enabled
of UIScrollView
for YES
and NO
within each delegate callback.