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);

        }];

posted @ 2016-06-12 11:38  徒步阳光855  阅读(127)  评论(0编辑  收藏  举报