Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)viewDidLoad {
- // 2. setup the scrollview for one image and add it to the view controller
- //
- [scrollView setBackgroundColor:[UIColor redColor]];
- [scrollView setCanCancelContentTouches:NO];
- scrollView.clipsToBounds = NO; // default is NO, we want to restrict drawing within our scrollview
- scrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
- //CGRect mainFrame = [[UIScreen mainScreen] applicationFrame];
- MyView *myView = [[MyView alloc] initWithFrame:CGRectMake(0, 0, 500, 400) ];
- [scrollView addSubview:myView];
- [scrollView setContentSize:CGSizeMake(myView.frame.size.width , myView.frame.size.height )];
- }
Add Comment
Please, Sign In to add comment