您的位置:首页 > 产品设计 > UI/UE

UIView动画animation 水平移动UILabel

2014-04-17 16:06 393 查看
这样的_currentChosedLabel会从最初的位置动画移动到下面设置的位置;
[UIView animateWithDuration:0.3950
animations:^{
_currentChosedLabel.frame =
CGRectMake(sender.frame.origin.x,
_currentChosedLabel.frame.origin.y, sender.frame.size.width,
_currentChosedLabel.frame.size.height);
} completion:^(BOOL finished){

}];
// [UIView beginAnimations:nil context:NULL];
// [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
// [UIView setAnimationBeginsFromCurrentState:YES];
// [UIView setAnimationDuration:0.3950];
// _currentChosedLabel.frame = CGRectMake(sender.frame.origin.x, _currentChosedLabel.frame.origin.y, sender.frame.size.width, _currentChosedLabel.frame.size.height);
// [UIView commitAnimations];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: