zoukankan      html  css  js  c++  java
  • 我的iOS动画01

    1.嵌套使用,先变大再消失

    [UIView animateWithDuration:1.25 aniamtions:^{

            CGAffineTransform newTRansform = CGAffineTransformMakeScale(1.2, 1.2);

            [firstImageView setTransform:newTransform];

            [secondImageView setTransform:newTransform];

            completion:^(BOOL finished){

                    [UIView animateWithDuration:1.2 animations:^{

                            [firstImageView setAlpha:0];

                            [secondImageView setAlpha:0];

                    }

                    completion:^(BOOL finished){

                            [firstImageView removeFromSuperview];

                            [secondImageView removeFromSuperview];

                    }

                    ];

            }

    ];

    ios 怎么设置动画让一个view从底部弹出来:

    首先设置一个VIEW初始位置在屏幕下, 比如iPhone6:CGRectMake(0, 667, 375, 667);

    然后在一个方法中(比如button出发的方法)view添加动画

    [UIView animateWithDuration:0.5 animations:^{

            // 设置view弹出来的位置

            self.myView.frame = CGRectMake(40, 100, 200, 250);

    }];

  • 相关阅读:
    8月8号
    8月10号
    8月5号
    8月7号
    8月4号
    8月3号。
    特殊符号 sort_wc_uniq命令 tee_tr_split命令
    管道符和作业 shell变量 环境变量
    shell 基础 history table键 通配符 输入输出重定向
    yum 源 地址的修改 源码包安装
  • 原文地址:https://www.cnblogs.com/Ewenblog/p/8183984.html
Copyright © 2011-2022 走看看