Created
September 28, 2014 12:19
-
-
Save sdpjswl/7717db1227c56c666abb to your computer and use it in GitHub Desktop.
Calculate UIScrollView content size
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
CGRect contentRect = CGRectZero; | |
for (UIView *view in scrollViewObject.subviews) { | |
contentRect = CGRectUnion(contentRect, view.frame); | |
} | |
scrollViewObject.contentSize = contentRect.size; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment