首先定义左下角的点...
CGPoint bottomLeft = CGPointMake(0, 480); // this can be anything.
然后你需要定义尺寸(大和小)。
CGSize bigSize = CGSizeMake(280, 280);
CGSize smallSize = CGSizeMake(50, 50); // again, these can be anything.
然后为它们制作动画...
// create the rect for the frame
CGRect bigFrame = CGRectMake(bottomLeft.x, bottomLeft.y - bigSize.height, bigSize.width, bigSize.height);
CGRect smallFrame = CGRectMake(bottomLeft.x, bottomLeft.y - smallSize.height, smallSize.width, smallSize.height);
[UIView animateWithDuration:0.2
animations:^{
// set the rect onto the view
bottomLbl.frame = bigFrame;
// or
bottomLbl.frame = smallFrame;
}];
只要您设置帧并且计算出的结束帧是正确的,并且全部在一个动画中完成,那么左下角就不会移动。
如果这没有帮助,请您发布正在发生的事情的视频(以及您的所有动画代码)。
编辑
[UIView animateWithDuration:0.2
delay:0.0
options:UIViewAnimationOptionBeginFromCurrentState
animations:^{
// set the rect onto the view
bottomLbl.frame = bigFrame;
// or
bottomLbl.frame = smallFrame;
}
completion:nil];