chourobin
2/7/2014 - 12:15 AM

Debug -[UIScrollView setContentOffset:animated:] by changing duration

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]