Why doesn't my subclass UIView get touches moved to UIScrollView?

I have a class called Boards, and it is a subclass UIView, I selected an instance of this and placed it in UIScrollView, I want it not to go to UIScrollView, but to subview: Boards (UIView), I just don’t know how to transfer strokes from UIScrollViewbefore UIView.

PS: I will change contentOffset UIScrollViewmanually, so I do not need strokes in UIScrollView, but in UIView.

PS: UIView Receives the event touchesEndedand touchesBegannottouchesMoved

+3
source share
4 answers

, UIScrollView , touchhesBegan/Moved/Canceled/Ended. . UIScrollView .

, UIScrollView . contentOffset view transform, .

, . . contentOffset frame.

, , , .

+2

delaysContentTouches . , , .

0

UIScrollView? , , UIView, .

@implementation SubclassOfScrollView

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    [self.nextResponder touchesBegan:touches withEvent:event];
}

@end
0

( ZoomScrollView + UIScrollView).
Apple ScrollViewSuite. .

0
source

Source: https://habr.com/ru/post/1728549/


All Articles