-
-
Save edwardean/2cb6f4315b6cf9bb82e24f641b7b1449 to your computer and use it in GitHub Desktop.
Debug -[UIScrollView setContentOffset:animated:] by changing duration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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