Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [UIView beginAnimations:nil context:nil];
- [UIView setAnimationDuration:3.0];
- [UIView setAnimationDelegate:self];
- [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
- transform = CGAffineTransformMakeScale(1,transformValue);
- image.transform = transform;
- image.center = CGPointMake(xValue, yValue);
- [UIView commitAnimations];
- [UIView animateWithDuration:3.0 delay:0.0 options:UIViewAnimationOptionCurveEaseInOut
- animations:^{
- UIImage *image = [UIImage imageNamed:@"button_connectMe.png"];
- CGImageRef tmpImgRef = image.CGImage;
- CGImageRef topImgRef = CGImageCreateWithImageInRect(tmpImgRef, CGRectMake(0, 30, image.size.width, image.size.height));
- UIImage *topImage = [UIImage imageWithCGImage:topImgRef];
- imgView.image = topImage;
- imgView.frame = CGRectMake(0, 180, topImage.size.width, topImage.size.height);
- }
- completion:^(BOOL finished) {
- NSLog(@"Final method");
- }
- ];
- UIImage *topImage = [UIImage imageWithCGImage:topImgRef];
- imgView.image = topImage;
- -(void)cropAnimateBottom
- {
- UIImage *image = [UIImage imageNamed:@"bar.png"];
- UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(150, 150, image.size.width, 0)];
- imageView.image = image;
- [imageView setClipsToBounds:YES];
- [imageView setContentMode:UIViewContentModeBottom];
- [self.view addSubview:imageView];
- [UIView animateWithDuration:3.0f
- delay:0.0f
- options:UIViewAnimationOptionCurveEaseIn
- animations:^(void) {
- imageView.frame = CGRectMake(150, 150, image.size.width, -image.size.height);
- }
- completion:NULL];
- }
- -(void)cropAnimateTop
- {
- UIImage *image = [UIImage imageNamed:@"bar.png"];
- UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 100, image.size.width, 0)];
- imageView.image = image;
- [imageView setClipsToBounds:YES];
- [imageView setContentMode:UIViewContentModeTop];
- [self.view addSubview:imageView];
- [UIView animateWithDuration:3.0f
- delay:0.0f
- options:UIViewAnimationOptionCurveEaseIn
- animations:^(void) {
- imageView.frame = CGRectMake(0, 100, image.size.width, image.size.height);
- }
- completion:NULL];
- }
Add Comment
Please, Sign In to add comment