iOS 启动页放大淡出效果

//屏幕宽度
#define kWIDTH [UIScreen mainScreen].bounds.size.width
//屏幕高度

#define kHEIGHT [UIScreen mainScreen].bounds.size.height

 

[objc] view plain copy
 
  1. UIImageView * lunchImg=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];  
  2.         lunchImg.image=[UIImage imageNamed:@"lunch"];  
  3.         [[UIApplication sharedApplication].keyWindow addSubview:lunchImg];  
  4.           
  5.           
  6.         [UIView animateWithDuration:0.8 animations:^{  
  7.             lunchImg.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1);  
  8.             lunchImg.alpha=0.0;  
  9.         } completion:^(BOOL finished) {  
  10.             [lunchImg removeFromSuperview];  
  11.         }];  
posted @ 2018-03-01 14:20  神来钥匙-陈诗友  阅读(559)  评论(0编辑  收藏  举报