iphone-UIButton中的动画gif

我写的代码运行之后,160*148尺寸的图片变的非常大,全屏了……

UIImageView* animatedImageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
animatedImageView.animationImages = [NSArray arrayWithObjects:    
                               [UIImage imageNamed:@"button1.png"],
                               [UIImage imageNamed:@"button2.png"],
                               [UIImage imageNamed:@"button3.png"],
                               [UIImage imageNamed:@"button4.png"], nil];
animatedImageView.animationDuration = 1.0f;
animatedImageView.animationRepeatCount = 0;
[animatedImageView startAnimating];
[yourButton addSubview: animatedImageView];

这个应该怎么解决?

楼主在初始化UIImageView的尺寸时 是否设置错了frame

imageview 属性设置呢1234567

把frame设置为yourButton的bounds