0

我的应用程序在 Retina 显示屏上适当地显示“@2x”版本的图像效果很好,除非我使用“animationImages”。在 Retina 屏幕上,它将这些动画图像显示为应有的两倍大。这是一个错误吗?还是我在这里做错了什么?

-(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];
4

1 回答 1

0

问题是这一行: coransStar1.image = starImage;

我不知道为什么,但是当我删除那条线(本来不应该存在的)时,问题就消失了。

于 2012-11-26T10:13:58.067 回答