Montana
Montana

Reputation: 69

UIScrollView doen't scroll when is into a UIPageViewController

I'm trying to use a UIScrollView as the content view into a PageViewController, I've configured the Page controller as it is on the sample project of xcode.

The problem is that the content has a Scroll view but it just doesn't scroll at all, I have seted the Content size and the properties for the scroll view.. I guess it is right configured.

- (UIScrollView *)scrollView
{
    if (_scrollView == NULL) {
        _scrollView = [[UIScrollView alloc] init];
        _scrollView.backgroundColor      = [UIColor whiteColor];
        _scrollView.scrollEnabled        = TRUE;
        _scrollView.alwaysBounceVertical = TRUE;
    }
    return _scrollView;
}

Then, I'd attached the gestures of my view to be the UIPageViewController gestures array, this was preventing a navigation bar to perform well, so I made a validation on:

gestureRecognizerShouldBegin:

And it is ok now.

I don't know how to fix this issue :S

Upvotes: 2

Views: 1238

Answers (1)

Nurullah Erel
Nurullah Erel

Reputation: 36

try this

 [scrollmngmt setScrollEnabled:YES];
 [scrollmngmt setContentSize:CGSizeMake(320, 1200)];



 [self setScrollmngmt:nil];

Upvotes: 2

Related Questions