view 放大缩小动画效果

  1. //创建缩小了的视图  
  2. myWeiBoImageVC = [[UIViewController alloc] init];  
myWeiBoImageVC.view.clipsToBounds = YES;   myWeiBoImageVC.view.alpha = 0.0;   myWeiBoImageVC.view.frame = CGRectMake(6401024-64768-20);   [self.view addSubview:myWeiBoImageVC.view];          CGAffineTransform newTransform =    CGAffineTransformScale(myWeiBoImageVC.view.transform0.10.1);   [myWeiBoImageVC.view setTransform:newTransform];   myWeiBoImageVC.view.center = CGPointMake(670100);       [self performSelector:@selector(imageViewControllerBigAnimation)];      //放大刚刚创建缩小后的视图   - (void)imageViewControllerBigAnimation{             [UIView beginAnimations:@"imageViewBig" context:nil];       [UIView setAnimationDuration:0.5];          CGAffineTransform newTransform =            CGAffineTransformConcat(myWeiBoImageVC.view.transform,  CGAffineTransformInvert(myWeiBoImageVC.view.transform));       [myWeiBoImageVC.view setTransform:newTransform];       myWeiBoImageVC.view.alpha = 1.0;       myWeiBoImageVC.view.center = CGPointMake(416510);       [UIView commitAnimations];         }      //缩小视图 隐藏      - (void)imageViewControllerSmallAnimation{          [UIView beginAnimations:@"imageViewSmall" context:nil];       [UIView setAnimationDuration:0.5];       CGAffineTransform newTransform =  CGAffineTransformScale(myWeiBoImageVC.view.transform0.10.1);       [myWeiBoImageVC.view setTransform:newTransform];       myWeiBoImageVC.view.center = CGPointMake(670100);       [UIView commitAnimations];         }

你可能感兴趣的:(view 放大缩小动画效果)