Skip to content

Instantly share code, notes, and snippets.

@jordanekay
Created February 7, 2014 00:15
Show Gist options
  • Save jordanekay/8855193 to your computer and use it in GitHub Desktop.
Save jordanekay/8855193 to your computer and use it in GitHub Desktop.
Debug -[UIScrollView setContentOffset:animated:] by changing duration
NSTimeInterval duration = 3.0;
SEL selector = @selector(_setContentOffsetAnimationDuration:);
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[scrollView methodSignatureForSelector:selector]];
[invocation setSelector:selector];
[invocation setTarget:scrollView];
[invocation setArgument:&duration atIndex:2];
[invocation invoke];
[scrollView setContentOffset:contentOffset animated:YES]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment