码迷,mamicode.com
首页 > 移动开发 > 详细

第13月第13天 iOS 放大消失动画

时间:2017-10-13 11:13:12      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:super   self   count   flow   string   gate   oms   rmi   bool   

1.

- (void) animate
{
    [UIView animateWithDuration:0.9 animations:^{
    
        CGAffineTransform transform = CGAffineTransformMakeScale(2.5, 2.5);
        self.countdownLabel.transform = transform;
        self.countdownLabel.alpha = 0;
        
    } completion:^(BOOL finished) {
        if (finished) {
            
             if (self.currentCountdownValue == 0) {
                 [self stop];
                 if (self.delegate) {
                     [self.delegate countdownFinished:self];
                     [self removeFromSuperview];
                 }
                 
             } else {

                self.countdownLabel.transform = CGAffineTransformIdentity;
                self.countdownLabel.alpha = 1.0;
                
                self.currentCountdownValue--;
                if (self.currentCountdownValue == 0) {
                    self.countdownLabel.text = self.finishText;
                } else {
                    self.countdownLabel.text = [NSString stringWithFormat:@"%d", self.currentCountdownValue ];
                }
            }
        }
    }];
}

 

https://github.com/simpliflow/SFCountdownView

 

第13月第13天 iOS 放大消失动画

标签:super   self   count   flow   string   gate   oms   rmi   bool   

原文地址:http://www.cnblogs.com/javastart/p/7660054.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!