我尝试将图像装入 UIScrollView
时遇到一个问题, 我不知道问题是否还存在于代码中, 或者在 Xcode 保留已删除图像的趋势中。 我尝试了所有可能的选项 :
- Delete and add again.
- Delete cache with Clean option
- Restore iphone simulator cache
但我不确定问题是否在我的代码里:
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;
}
EDITED:这是对项目文件系统的屏幕拍摄, 图像以Expular/GBC/caras形式储存:
""https://i.sstatic.net/6SpFD.png" alt="此处的内置图像描述"/"