ios - Using UIPageViewController in UIScrollView -
i have uipageviewcontroller placed in uiscrollview, pageview scrolling in horizontal direction, scrollview in vertical. scrollview works fine, when swipe horizontal in pageview area nothing happend.
i tried add every scrollview gesture recognizers requiregesturerecognizertofail gesture recognizers pageview, off scrolling on pageview area:
uiscrollview sv; (uiview *view in self.pageviewcontroller.view.subviews) { if ([view iskindofclass:[uiscrollview class]]) { sv = (uiscrollview*)view; } } (uigesturerecognizer *gesturerecognizer in sv.gesturerecognizers) { (uigesturerecognizer *gesturerecognizerforfail in self.scrollview.gesturerecognizers) { [gesturerecognizerforfail requiregesturerecognizertofail:gesturerecognizer]; } }
the every controllers in pageview works fine, when change them buttons in scrollview, swipe doesn't work.
Comments
Post a Comment