我使用这个代码,这个工作,真正的图像大小为 160x148,但图像按钮在所有屏幕上都非常大!
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];
如何解决?