Simple UIScrollView Initialization


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  1. UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
  2. scrollView.contentSize = CGSizeMake(self.view.frame.size.width * 3, self.view.frame.size.height);
  3. scrollView.contentOffset = CGPointMake(320, 0);
  4. scrollView.showsVerticalScrollIndicator = FALSE;
  5. scrollView.showsHorizontalScrollIndicator = FALSE;
  6. scrollView.pagingEnabled = TRUE;
  7. scrollView.backgroundColor = [UIColor blackColor];
  8. scrollView.delegate = self;
  9. [self.view addSubview:scrollView];
  10. [scrollView release];

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.