Iphone 带UIView动画块的UIImageanimation
我想将UIView动画与块一起使用,而不是UIImageview动画。因为我需要知道动画何时完成,所以我决定使用UIView动画和我不熟悉的块。 所以我想要这个:Iphone 带UIView动画块的UIImageanimation,iphone,animation,uiview,uiimageview,Iphone,Animation,Uiview,Uiimageview,我想将UIView动画与块一起使用,而不是UIImageview动画。因为我需要知道动画何时完成,所以我决定使用UIView动画和我不熟悉的块。 所以我想要这个: NSMutableArray *mixedimages = [[NSMutableArray alloc] initWithCapacity:5]; for(int count = 1; count <= 5; count++) { NSString *fileName = [NSString stri
NSMutableArray *mixedimages = [[NSMutableArray alloc] initWithCapacity:5];
for(int count = 1; count <= 5; count++)
{
NSString *fileName = [NSString stringWithFormat:@"Picture_%d.jpg", count];
UIImage *frame = [UIImage imageNamed:fileName];
[mixedimages addObject:frame];
}
gamePicture.animationImages = mixedimages;
gamePicture.animationDuration = 1;
gamePicture.animationRepeatCount = 10;
[gamePicture startAnimating];
但我不知道要填充什么代码才能完成与上述相同的操作,因此我将拥有相同类型的动画。您不能使用UIView动画为UIImageView的内容制作动画。UIView动画只能为一组固定的UIView属性设置动画:
@property frame
@property bounds
@property center
@property transform
@property alpha
@property backgroundColor
@property contentStretch
要解决UIImageView缺少完成块的问题,您可以参考以下答案:
是否有其他方法来设置图像动画?
@property frame
@property bounds
@property center
@property transform
@property alpha
@property backgroundColor
@property contentStretch