yes, pt2ph8 answer is correct,
but if for some strange reason your contentSize should be higher than UIScrollView, you can disable vertical scrolling that implements the UIScrollView protocol method
-(void)scrollViewDidScroll:(UIScrollView *)aScrollView;
just add this to your UIViewController
float oldY; // here or better in .h interface - (void)scrollViewDidScroll:(UIScrollView *)aScrollView { [aScrollView setContentOffset: CGPointMake(aScrollView.contentOffset.x, oldY)]; // or if you are sure you wanna it always on top: // [aScrollView setContentOffset: CGPointMake(aScrollView.contentOffset.x, 0)]; }
it's just a method called when the user scrolls your UIScrollView and makes sure its contents are always the same .y
meronix Feb 23 2018-11-28T00: 00Z
source share