Skip to content

Instantly share code, notes, and snippets.

@gliubc
Last active November 26, 2019 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gliubc/a4f8eb2411259e9e002bf114d045bcd0 to your computer and use it in GitHub Desktop.
Save gliubc/a4f8eb2411259e9e002bf114d045bcd0 to your computer and use it in GitHub Desktop.
UIScrollView *scrollView = UIScrollView.new;
for (UIView *view in [[NSBundle mainBundle] loadNibNamed:NSStringFromClass(Test1VC.class) owner:self options:nil]) {
[scrollView addSubview:view];
view.frame = CGRectMake(0, scrollView.contentSize.height, view.frame.size.width, view.frame.size.height);
scrollView.contentSize = CGSizeMake(view.frame.size.width, scrollView.contentSize.height + view.frame.size.height);
}
self.view = scrollView;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment