Guest User

Untitled

a guest
Jul 11th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. - (void)viewDidLoad {
  2. // 2. setup the scrollview for one image and add it to the view controller
  3. //
  4. [scrollView setBackgroundColor:[UIColor redColor]];
  5. [scrollView setCanCancelContentTouches:NO];
  6. scrollView.clipsToBounds = NO; // default is NO, we want to restrict drawing within our scrollview
  7. scrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
  8. //CGRect mainFrame = [[UIScreen mainScreen] applicationFrame];
  9.  
  10. MyView *myView = [[MyView alloc] initWithFrame:CGRectMake(0, 0, 500, 400) ];
  11. [scrollView addSubview:myView];
  12. [scrollView setContentSize:CGSizeMake(myView.frame.size.width , myView.frame.size.height )];
  13.  
  14.  
  15. }
Add Comment
Please, Sign In to add comment