Posted By

paki on 09/26/11


Tagged

UIScrollView


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

Tintenklecks
raulestevez
cnathan


Simple UIScrollView Initialization


 / Published in: Objective C
 

  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  

You need to login to post a comment.