我在尝试将图像加载到UIScrollView
. 我已经尝试了所有可能的选项:
- 删除并重新添加。
- 使用 Clean 选项删除缓存
- 恢复iphone模拟器缓存
但我不确定问题是否出在我的代码中:
fotosJugadores = [[NSArray alloc] initWithObjects:@"cara5.png", @"cara7.png",
@"cara8.png", @"cara9.png", @"cara11.png", @"cara13.png", @"cara14.png",
@"cara15.png", @"cara18.png",@"cara19.png", @"cara20.png",
@"cara32.png",@"cara44.png",@"cara51.png", @"cara100.png", @"cara101.png",
@"cara102.png",@"cara103.png", @"cara104.png",
@"cara105.png",@"cara106.png",@"cara107.png", nil];
numberOfViews = [fotosJugadores count];
for (int i = 0; i < [fotosJugadores count]; i++) {
UIImage *myImage = [UIImage imageNamed:[fotosJugadores objectAtIndex:i]];
CGFloat yOrigin = i * myImage.size.width + 120;
NSLog(@"my image %@", myImage);
UIImageView *awesomeView = [[UIImageView alloc] initWithFrame:CGRectMake(yOrigin, 0, myImage.size.width, myImage.size.height)];
awesomeView.tag = i;
awesomeView.image = myImage;
awesomeView.alpha = 0.5f;
awesomeView.backgroundColor = [UIColor blackColor];
[self.jugadorSlide addSubview:awesomeView];
awesomeView=nil;
}
已编辑:这是项目文件系统的屏幕截图,图像存储在 exular/GBC/Caras 中: