我有一个UIImageView
,我需要在屏幕上进行动画制作。我通过在1秒的动画块中将帧调整为0来做到这一点。如果我单独保留内容类型(这是缩放类型之一),它会缩小为0,但会随着它调整到新的帧大小而缩小图像。 我需要它只是削减底部而不是。我将内容类型更改为左上角,导致它无法执行任何操作。
我在这里错过了什么?将UIImageView从屏幕动画化
这是动画块代码。
// Change frame height.
[UIView animateWithDuration:1.0f
animations:^ {
// Animate the frame off the screen
_closeImage.frame = CGRectMake(_closeImage.frame.origin.x, _closeImage.frame.origin.y, _closeImage.frame.size.width, 0);
}
];
什么你的意思是内容类型? – 2011-05-31 13:30:14
他意味着规模模式。 @btate,尝试其他scaleModes。 – Moshe 2011-05-31 13:34:23