Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- [theScrollView setContentSize:CGSizeMake(3 * theScrollView.bounds.size.width, theScrollView.bounds.size.height)];
- [theScrollView setPagingEnabled:YES];
- CGRect aFrame = theScrollView.bounds;
- UIView* view;
- NSLog(@"Frame: %@", NSStringFromCGRect(aFrame));
- view = [[UIView alloc] initWithFrame:aFrame];
- [view setBackgroundColor:[UIColor blueColor]];
- [theScrollView addSubview:view];
- aFrame = CGRectOffset(aFrame, theScrollView.bounds.size.width, 0);
- NSLog(@"Frame: %@", NSStringFromCGRect(aFrame));
- view = [[UIView alloc] initWithFrame:aFrame];
- [view setBackgroundColor:[UIColor redColor]];
- [theScrollView addSubview:view];
- aFrame = CGRectOffset(aFrame, theScrollView.bounds.size.width, 0);
- NSLog(@"Frame: %@", NSStringFromCGRect(aFrame));
- view = [[UIView alloc] initWithFrame:aFrame];
- [view setBackgroundColor:[UIColor yellowColor]];
- [theScrollView addSubview:view];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement