zoukankan      html  css  js  c++  java
  • uiview 动画

        [UIView beginAnimations:nil context:nil];

        [UIView setAnimationDelay:0.1];

        

        if (sender.tag == 0) {

            

            lineLabel.frame = CGRectMake(kScreenWidth / 3 * sender.tag, 40, kScreenWidth / 3, 1);

        }

        if (sender.tag == 1) {

     

            lineLabel.frame = CGRectMake(kScreenWidth / 3 * sender.tag, 40, kScreenWidth / 3, 1);

        }

     

        if (sender.tag == 2) {

     

            lineLabel.frame = CGRectMake(kScreenWidth / 3 * sender.tag, 40, kScreenWidth / 3, 1);

        }

     

        [UIView commitAnimations];

     

     

    或者

     

    [UIView animateWithDuration:0.3f animations:^{

                

                _lineLabel.frame = CGRectMake(0, 40, kScreenWidth / 3, 1);

            }];

  • 相关阅读:
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
  • 原文地址:https://www.cnblogs.com/tom2015010203/p/5577034.html
Copyright © 2011-2022 走看看