【发布时间】:2015-07-06 20:50:28
【问题描述】:
所以下面的代码将 self.nowGamePiece 移动到棋盘的中心,但它并没有将大小更改为 500 x 500。事实上,无论这些值(CGRectMake 中的宽度和高度)是什么,此动画中的大小不会改变。
为什么? self.nowGamePiece 也应该将其大小更改为 500x 500!
//self.nowGamePiece is a UIView
[UIView animateWithDuration:7 animations:^{
self.nowGamePiece.frame = CGRectMake(self.gameBoardImageView.center.x,self.gameBoardImageView.center.y, 500, 500);
//doing below only moves the self.nowGamePiece too. Size doesn't change
//self.nowGamePiece.frame = CGRectMake(100, 100, 500, 500);
} completion:^(BOOL finished){
return;
}];
【问题讨论】:
标签: ios animation uiview frame