十一岁的加重songxing10000…… ------ 回到博主首页

pop动画库简单使用小记




- (void)animateInView:(UIView *)view{ UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"auto_common_点赞高亮"]]; imageView.frame = view.frame; imageView.contentMode = UIViewContentModeScaleAspectFit; [self addSubview:imageView]; view.hidden = YES; POPBasicAnimation *animation = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerSize]; animation.duration = 0.2; [animation setCompletionBlock:^(POPAnimation *anim, BOOL finish) { if (finish) { POPBasicAnimation *animation = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerSize]; animation.duration = 0.1; [animation setCompletionBlock:^(POPAnimation *anim, BOOL finish) { if (finish) { [imageView removeFromSuperview]; view.hidden = NO; } }]; animation.toValue = [NSValue valueWithCGSize:view.lh_size]; [imageView pop_addAnimation:animation forKey:@"size"]; } }]; animation.toValue = [NSValue valueWithCGSize:CGSizeMake(40, 40)]; [imageView pop_addAnimation:animation forKey:@"size"]; }

 

posted @ 2017-03-03 15:04  songxing10000  阅读(291)  评论(0编辑  收藏  举报