Skip to content

Instantly share code, notes, and snippets.

@blixt
Last active August 29, 2015 14:14
Show Gist options
  • Save blixt/98f42a0656562ca7fc8e to your computer and use it in GitHub Desktop.
Save blixt/98f42a0656562ca7fc8e to your computer and use it in GitHub Desktop.
// Create the scroll view which enables the horizontal swiping.
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:self.bounds];
scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
scrollView.contentSize = self.bounds.size;
scrollView.contentInset = UIEdgeInsetsMake(0, 160, 0, 0);
scrollView.delegate = self;
scrollView.scrollsToTop = NO;
scrollView.showsHorizontalScrollIndicator = NO;
scrollView.showsVerticalScrollIndicator = NO;
[self.contentView addSubview:scrollView];
self.scrollView = scrollView;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment