最初に左下隅のポイントを定義します...
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;
}];
フレームを設定し、計算された終了フレームが正しく、すべてが 1 つのアニメーションで完了している限り、左下隅は移動しません。
これで問題が解決しない場合は、何が起こっているか (およびすべてのアニメーション コード) のビデオを投稿してください。
編集
[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];