zoukankan      html  css  js  c++  java
  • 0108 UIview 动画


    -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
    {
    //打印动画块的位置
    NSLog(@"动画执行之前的位置:%@",NSStringFromCGPoint(self.customView.center));

    //首尾式动画
    [UIView beginAnimations:nil context:nil];
    //执行动画
    //设置动画执行时间
    [UIView setAnimationDuration:2.0];
    //设置代理
    [UIView setAnimationDelegate:self];
    //设置动画执行完毕调用的事件
    [UIView setAnimationDidStopSelector:@selector(didStopAnimation)];
    self.customView.center=CGPointMake(200, 300);
    [UIView commitAnimations];

    }

    -(void)didStopAnimation
    {
    NSLog(@"动画执行完毕");
    //打印动画块的位置
    NSLog(@"动画执行之后的位置:%@",NSStringFromCGPoint(self.customView.center));
    }

  • 相关阅读:
    归并排序
    快速排序
    希尔排序
    插入排序
    选择排序
    冒泡排序
    排序算法
    Win10 家庭版升级到专业版报错
    WPF 原生Style
    在线图片转换
  • 原文地址:https://www.cnblogs.com/gzz2016/p/5112010.html
Copyright © 2011-2022 走看看