Quote:
Originally Posted by ricard.perez
There's no need to subclass UIScrollView for this.
After researching for a while (and I've also tried the approach discussed right here), I've seen that with just two lines you'll get the perfect result:
scrollView.canCancelContentTouches = NO;
scrollView.delaysContentTouches = NO;
That's it! 
|
But which control is drived from UIControl that controls are not make the scroll in scrollview.
Ex. we add the UIButton in UIScrollview then set the above mentioned property. That time the scroll function not enable in the UIButton region. But the UIPickerview control swipe or scroll. So we are override the UIScrollview function "- (BOOL)touchesShouldCancelInContentView

UIView *)view". So create the custom class inherited by UIScrollview and override that function like that EX.
EX.
- (BOOL)touchesShouldCancelInContentView

UIView *)view {
if ([view isKindOfClass:[UIPickerView class]] || [@"UIPickerTable" isEqualToString:[[view class] description]] ) {
return NO;
}
return YES;
}
Note:
-------
That method called only the Scrollview property canCancelContentTouches = YES.
So only set the property delaysContentTouches = NO. Because the canCancelContentTouches default value is YES.