For disabling the horizontal scroll, you can set the content size in the (void)scrollViewDidScroll method.
1 | [self.scrollView setContentOffset: CGPointMake(0, self.scrollView.contentOffset.y)]; |
You’ll also want to set the directional lock so only 1 scroll direction is used at a time.https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIScrollView_Class/index.html#//apple_ref/occ/instp/UIScrollView/directionalLockEnabled
1 | self.scrollView.directionalLockEnabled = YES; |
from:http://stackoverflow.com/questions/25981635/uiscrollview-autolayout-vertical-only