添加弹跳动画,同时更改UIVIew框架。我只知道如何改变框架,但我不知道如何设置弹跳效果,同时改变视图框架。下面是我的密码..。
[UIView animateWithDuration:0.3 delay:0.0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
CGRect frame = viewContent.frame;
frame.size.height = CGRectGetHeight(viewContentFullDetail);
viewContent.frame = frame;
} completion:^(BOOL finished) { }];您可以在下面的链接上检查动画gif图像。我想添加动画,不一样的,但接近这个。主要动画有展开和弹跳效果。
请帮帮忙。我不知道该怎么做。
发布于 2015-09-21 05:23:47
你得试试这个
int duration, damping, velocity;
[UIView animateWithDuration:duration delay:0
usingSpringWithDamping:damping initialSpringVelocity:velocity
options:0 animations:^{
// your animation code here
} completion:nil];播放阻尼和速度值,以了解更多关于这个特性的动画代码。这里是教程的链接
https://stackoverflow.com/questions/32687817
复制相似问题