Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- self.title = NSLocalizedString(@"TransitionsTitle", @"");
- // create the container view which we will use for transition animation (centered horizontally)
- CGRect frame = CGRectMake(round((self.view.bounds.size.width - kImageWidth) / 2.0),kTopPlacement, kImageWidth, kImageHeight);
- self.containerView = [[[UIView alloc] initWithFrame:frame] autorelease];
- [self.view addSubview:self.containerView];
- // create the initial image view
- frame = CGRectMake(0.0, 0.0, kImageWidth, kImageHeight);
- self.mainView = [[[UIImageView alloc] initWithFrame:frame] autorelease];
- self.mainView.image = [UIImage imageNamed:@"img11.jpeg"];
- [self.containerView addSubview:self.mainView];
- // create the alternate image view (to transition between)
- CGRect imageFrame = CGRectMake(0.0, 0.0, kImageWidth, kImageHeight);
- self.curlToView = [[[UIImageView alloc] initWithFrame:imageFrame] autorelease];
- self.curlToView.image = [UIImage imageNamed:@"img12.jpeg"];
- frame1 = CGRectMake(0.0, 0.0, kImageWidth, kImageHeight);
- self.curlToView = [[[UIImageView alloc] initWithFrame:frame1] autorelease];
- self.curlToView.image = [UIImage imageNamed:@"img13.jpeg"];
- CGRect imageFrame1 = CGRectMake(0.0, 0.0, kImageWidth, kImageHeight);
- self.curlToView = [[[UIImageView alloc] initWithFrame:imageFrame1] autorelease];
- self.curlToView.image = [UIImage imageNamed:@"img14.jpeg"];
- }
Add Comment
Please, Sign In to add comment