Created
March 31, 2016 17:32
-
-
Save mojtabacazi/cc3ea21a5d6a788de72fa18a9ae8d0f0 to your computer and use it in GitHub Desktop.
Changing UIScrollView contentOffset without triggering scrollViewDidScroll:
This file contains 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
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