Skip to content

Instantly share code, notes, and snippets.

@mojtabacazi
Created March 31, 2016 17:32
Show Gist options
  • Save mojtabacazi/cc3ea21a5d6a788de72fa18a9ae8d0f0 to your computer and use it in GitHub Desktop.
Save mojtabacazi/cc3ea21a5d6a788de72fa18a9ae8d0f0 to your computer and use it in GitHub Desktop.
Changing UIScrollView contentOffset without triggering scrollViewDidScroll:
CGPoint desiredContentOffset = <#content offset#>;
CGRect scrollBounds = scrollView.bounds;
scrollBounds.origin = desiredContentOffset;
scrollView.bounds = scrollBounds;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment