• IOS 动画的两种方式


    方式一:

    [UIView animateWithDuration:1 animations:^{
            //动画的内容
            CGRect frame = CGRectMake([UIParam widthScreen]-25, 54, 0, 0);
            [self setFrame:frame];
            
            CGRect frame1 = CGRectMake(0, 0, 0, 0);
            
            [self setAnimationFrame:self frame:frame1];
            
        }completion:^(BOOL finished){
            if ([self.lockerDelegate respondsToSelector:@selector(animationFinished)]) {
                [self.lockerDelegate animationFinished];
            }
        }];
    -(void)setAnimationFrame:(UIView*)view frame:(CGRect)rect{
        for (UIView *uv in view.subviews) {
            [uv setFrame:rect];
            
            [self setAnimationFrame:uv frame:rect];
        }
    }
    

     方式二:

    [UIView beginAnimations:nil context:nil];
                //设定动画持续时间
            [UIView setAnimationDuration:DurationTime];
                //动画的内容
            [self removeFromSuperview];
                //动画结束 
            [UIView commitAnimations];
    
  • 相关阅读:
    class线程信息
    Class 文件简介
    JVM对象及垃圾回收处理
    jvm体系结构
    查找

    二叉树
    队列


  • 原文地址:https://www.cnblogs.com/SimonGao/p/4613445.html
Copyright © 2020-2023  润新知