Reputation: 11
Hi I have a image in a view controller that has a scroll view, when the user scrolls to the bottom, there is a button that they click and it hides the view they were looking at and loads another, but it stays at the bottom because of the scroll view, so how can I go about reseting the scroll view back to the top when you click that button?
Upvotes: 1
Views: 1862
Reputation: 11314
on your button click do
[self.scrollView setContentOffset:CGPointMake(0, 0)];
scrollView is the scroll view object.Replace it with your scroll view object name.
Upvotes: 4