リソースフォルダに「hit_circle_0.png」から「hit_circle_19.png」までの画像がありますが、何らかの理由でこのコードが「見つかった」のテストに合格しないのは、そのすぐ下の別のメソッドでまったく同じ関数が機能していることです。 。そして、ファイルは「バンドルリソースのコピー」にあります
NSMutableArray *hitCircle = [[NSMutableArray alloc]init];
for (int i = 0; i < 20; i++) {
NSString *name = [NSString stringWithFormat:@"hit_circle_%i", i];
NSString *filePath= [[NSBundle mainBundle] pathForResource:name ofType:@"png"];
if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]){
NSLog(@"file %@ was found", filePath);
} else{
NSLog(@"%@ not found", filePath);
}
}