Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- self.view.backgroundColor = kColorDarkRed;
- UIImage *image = [UIImage imageNamed:@"main_screen_image_background.png"];
- UIImageView *background = [[UIImageView alloc] initWithImage:image];
- background.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
- background.userInteractionEnabled = NO;
- UIButton *startButton = [UIButton buttonWithType:UIButtonTypeCustom];
- startButton.frame = CGRectMake(75.0, 380.0, 170.0, 70.0);
- [startButton setImage:[UIImage imageNamed:@"main_screen_image_start_button_normal.png"] forState:UIControlStateNormal];
- [startButton setImage:[UIImage imageNamed:@"main_screen_image_start_button_highlighted.png"] forState:UIControlStateHighlighted];
- [startButton addTarget:self action:@selector(startButtonTouched) forControlEvents:UIControlEventTouchUpInside];
- [startButton setUserInteractionEnabled:YES];
- UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeCustom];
- infoButton.frame = CGRectMake(290, 10, 20, 24);
- [infoButton setImage:[UIImage imageNamed:@"main_screen_image_info_button_normal.png"] forState:UIControlStateNormal];
- [infoButton setImage:[UIImage imageNamed:@"main_screen_image_info_button_highlighted.png"] forState:UIControlStateHighlighted];
- UIButton *mentionMobileButton = [UIButton buttonWithType:UIButtonTypeCustom];
- mentionMobileButton.frame = CGRectMake(10, 10, 108, 22);
- [mentionMobileButton setImage:[UIImage imageNamed:@"main_screen_image_mention_mobile_button.png"] forState:UIControlStateNormal];
- scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(26.0, 120.0, 270.0, 250.0)];
- [scrollView setBackgroundColor:[UIColor whiteColor]];
- [scrollView setShowsHorizontalScrollIndicator:NO];
- [scrollView setShowsVerticalScrollIndicator:NO];
- UIImage *im0 = [UIImage imageNamed:@"placeholder.png"];
- UIImageView *imv0 = [[UIImageView alloc] initWithImage:im0];
- UIImageView *imv1 = [[UIImageView alloc] initWithImage:im0];
- UIImageView *imv2 = [[UIImageView alloc] initWithImage:im0];
- UIImageView *imv3 = [[UIImageView alloc] initWithImage:im0];
- UIImageView *imv4 = [[UIImageView alloc] initWithImage:im0];
- UIImageView *imv5 = [[UIImageView alloc] initWithImage:im0];
- [scrollView addSubview:imv0];
- [scrollView addSubview:imv1];
- [scrollView addSubview:imv2];
- [scrollView addSubview:imv3];
- imv0.frame = CGRectMake(scrollView.bounds.origin.x + PICTURES_LATERAL_MARGIN, scrollView.bounds.origin.y + PICTURES_TOP_MARGIN, MAIN_SCREEN_PICTURE_WIDTH, MAIN_SCREEN_PICTURE_HEIGHT);
- imv1.frame = CGRectMake(scrollView.bounds.origin.x + PICTURES_LATERAL_MARGIN + MAIN_SCREEN_PICTURE_WIDTH + PICTURES_INNER_SPACING, scrollView.bounds.origin.y + PICTURES_TOP_MARGIN, MAIN_SCREEN_PICTURE_WIDTH, MAIN_SCREEN_PICTURE_HEIGHT);
- imv2.frame = CGRectMake(scrollView.bounds.origin.x + PICTURES_LATERAL_MARGIN, scrollView.bounds.origin.y + PICTURES_TOP_MARGIN + MAIN_SCREEN_PICTURE_HEIGHT + PICTURES_INNER_SPACING, MAIN_SCREEN_PICTURE_WIDTH, MAIN_SCREEN_PICTURE_HEIGHT);
- imv3.frame = CGRectMake(scrollView.bounds.origin.x + PICTURES_LATERAL_MARGIN + MAIN_SCREEN_PICTURE_WIDTH + PICTURES_INNER_SPACING, scrollView.bounds.origin.y + PICTURES_TOP_MARGIN + MAIN_SCREEN_PICTURE_HEIGHT + PICTURES_INNER_SPACING, MAIN_SCREEN_PICTURE_WIDTH, MAIN_SCREEN_PICTURE_HEIGHT);
- [scrollView setContentSize:(CGSizeMake(scrollView.frame.size.width, PICTURES_BOTTOM_MARGIN + PICTURES_TOP_MARGIN + 2.0*(MAIN_SCREEN_PICTURE_HEIGHT) + 1.0*10.0))];
- [self.view addSubview:scrollView];
- [self.view addSubview:background];
- [self.view addSubview:mentionMobileButton];
- [self.view addSubview:startButton];
- [self.view addSubview:infoButton];
- }
Add Comment
Please, Sign In to add comment