Reputation: 2898
I am using a UIScrollView to scroll horizontally between 3 different UIViews (I call them pages because I have scrollView.pagingEnabled=YES;
). Each page can also be scrolled vertically. My problem is that even if I use scrollView.directionalLockEnabled=YES;
it still scrolls in both directions. How can I stop this for happening. (I want a similar behavior with the one that the Calendar app has, when Day mode is selected; I have already checked some calendar apps, but they don't have the horizontal scrolling enabled).
Thank you!
Upvotes: 0
Views: 1749
Reputation: 6160
set the content size of the scrollView to be equal of the scrollView height.
scrollView.contentSize = CGSizeMake(scrollView.frame.size.width * pages.count,scrollView.frame.size.height);
Upvotes: 1