Skip to content

Instantly share code, notes, and snippets.

@Me1000
Created January 27, 2015 02:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Me1000/9e403383da23be2fc918 to your computer and use it in GitHub Desktop.
Save Me1000/9e403383da23be2fc918 to your computer and use it in GitHub Desktop.
// totally works!
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:.5
initialSpringVelocity:1
options:0
animations:^{
CGRect bounds = self.scrollview.bounds;
bounds.origin = CGPointZero;
self.scrollview.bounds = bounds;
} completion:^(BOOL finished) {
NSLog(@"Bounds: %@", NSStringFromCGRect(self.scrollview.bounds));
NSLog(@"offset: %@", NSStringFromCGPoint(self.scrollview.contentOffset));
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment