Skip to content

Instantly share code, notes, and snippets.

@saiday
Created February 15, 2015 08:45
Show Gist options
  • Select an option

  • Save saiday/f8d7fe3739e7238e1691 to your computer and use it in GitHub Desktop.

Select an option

Save saiday/f8d7fe3739e7238e1691 to your computer and use it in GitHub Desktop.
- (void)findMisbehavingScrollViews
{
UIView *view = [[UIApplication sharedApplication] keyWindow];
[self findMisbehavingScrollViewsIn:view];
}
- (void)findMisbehavingScrollViewsIn:(UIView *)view
{
if ([view isKindOfClass:[UIScrollView class]])
{
NSLog(@"Found UIScrollView: %@", view);
if ([(UIScrollView *)view scrollsToTop])
{
NSLog(@"scrollsToTop = YES!");
}
}
for (UIView *subview in [view subviews])
{
[self findMisbehavingScrollViewsIn:subview];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment