Ios UIView在';这是不应该的

Ios UIView在';这是不应该的,ios,animation,uiview,uiimageview,Ios,Animation,Uiview,Uiimageview,我想用动画将屏幕上的UIImageView从一个点移动到另一个点。当图像到达我想要的点时,它应该在没有任何动画的情况下重新出现在另一点上。我尝试了不同的方法,但我希望这是最好的方法: [UIView animateWithDuration:0.5f animations:^{ image.center = CGPointMake(40, 15); } completion:^(BOOL finished) {

我想用动画将屏幕上的
UIImageView
从一个点移动到另一个点。当图像到达我想要的点时,它应该在没有任何动画的情况下重新出现在另一点上。我尝试了不同的方法,但我希望这是最好的方法:

[UIView animateWithDuration:0.5f animations:^{
            image.center = CGPointMake(40, 15); }
                         completion:^(BOOL finished) {
                             image.center = CGPointMake(900, 500);
                             }];
但是当图像应该在900x,500y点上重新出现时,会发生什么呢?它会在那里设置动画。我甚至试过这样的方法:

[UIView animateWithDuration:0.5f animations:^{
            image.center = CGPointMake(40, 15); }
                         completion:^(BOOL finished) {
                             image.hidden=YES;
                             if (image.isHidden) {
                             image.center = CGPointMake(1600, RandomPosition);
                             }
                         }];
但似乎什么都不管用!我真的觉得自己像个傻瓜,因为这必须非常简单,也许是的,我只是做错了。
谢谢你的帮助

这与我想要的正好相反,我想要动画到点40x,15y,而不是动画到900x,500y@Mykod我很抱歉回答错误。我创建了一个新项目并运行了上面的代码,代码没有问题。很抱歉我帮不了你。
image.center = CGPointMake(40, 15);
[UIView animateWithDuration:0.5f animations:^{
        image.center = CGPointMake(900, 500); }
                     completion:^(BOOL finished) {
                         ;
                         }];