Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swift scrollview auto fit content height

CGRect contentRect = CGRectZero;

for (UIView *view in self.scrollView.subviews) {
    contentRect = CGRectUnion(contentRect, view.frame);
}
self.scrollView.contentSize = contentRect.size;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #swift #scrollview #auto #fit #content #height
ADD COMMENT
Topic
Name
6+6 =