我的应用程序正好在Retina显示屏上正确显示“@ 2x”版本的图像,除非我使用“animationImages”。在Retina屏幕上,它显示这些animationImages的两倍大。这是一个错误吗?或者我在这里做错了什么?
-(void)viewDidLoad;
coransStar1 = [[[UIImageView alloc] initWithFrame:CGRectMake(46, 272, 48, 45)] autorelease];
coransStar1.image = starImage;
coransStar1.opaque = YES;
NSArray * imageArray = [[NSArray alloc] initWithObjects:
[UIImage imageNamed:@"star1"],
[UIImage imageNamed:@"star2"],
[UIImage imageNamed:@"star3"],
[UIImage imageNamed:@"star4"],
[UIImage imageNamed:@"star5"],
[UIImage imageNamed:@"star6"],
[UIImage imageNamed:@"star7"],
[UIImage imageNamed:@"star8"],
nil];
coransStar1.animationImages = imageArray;
coransStar1.animationDuration = 1.1;
coransStar1.contentMode = UIViewContentModeBottomLeft;
[coransView addSubview:coransStar1];
[coransStar1 startAnimating];
答案 0 :(得分:0)
问题在于这一行:coransStar1.image = starImage;
我不知道为什么,但是当我删除那条线(首先不应该在那里时,问题就消失了。