1

有没有办法在我的 iphone 应用程序中冻结动画的最后一帧?到目前为止,这是我的代码。

popup.animationImages = [NSArray arrayWithObjects:
                                 [UIImage imageNamed:@"picture1.png"],
                                 [UIImage imageNamed:@"picture2.png"],
                                 [UIImage imageNamed:@"picture3.png"],
                                 [UIImage imageNamed:@"picture4.png"],
                                 [UIImage imageNamed:@"picture5.png"],
                                 [UIImage imageNamed:@"picture6.png"],
                                 [UIImage imageNamed:@"picture7.png"], nil];
        popup.animationDuration = 1.750567;
        popup.animationRepeatCount = 1;
        [popup startAnimating];
        [self.view addSubview:popup];
4

1 回答 1

1

当动画停止时 UIImageView 显示 UIImage 在其image属性中设置。因此,您应该将其设置为动画的最后一帧:

popup.image =  [UIImage imageNamed:@"picture7.png"];
于 2010-03-02T07:36:11.150 回答