在我的应用程序中,我使用了移动子视图。如果它达到 y=150,我想制作一个跳跃效果的按钮,我尝试了这个链接,将反弹效果添加到 UIImageView 的外观,它在水平方向上工作,我想要一个垂直方向,这是我的代码,
-(void)godown
{
if (movingview.center.y < 150) movingview.center = CGPointMake(movingview.center.x, movingview.center.y +5);
if(movingview.center.y ==150)
{
[UIView beginAnimations:@"bounce" context:nil];
[UIView setAnimationRepeatCount:3];
[UIView setAnimationRepeatAutoreverses:YES];
CGAffineTransform transform = CGAffineTransformMakeScale(1.3,1.3);
bt1.transform = transform;
bt2.transform=transform;
[UIView commitAnimations];
}
}
请帮我改成跳跃效果(垂直)?