开发者

Cocoa Touch - Resources Question

Hey all, I have a selector that searches the mainBundle for all .aif files, and allows the user to select them. This works fine, but then I removed some of the files from the project and folder, yet they did not disappear. Is there any way to m开发者_开发技巧aybe recompile it or something because It's now plagued with sound files that I don't need.

Thanks!

- (void)loadPossibleSounds {
    NSBundle *soundBundle = [NSBundle mainBundle];
    possDrumSounds = [soundBundle pathsForResourcesOfType:@"aif" inDirectory:nil];
    NSLog(@"PossDrumSounds: %@", possDrumSounds);
    [possDrumSounds retain];
}

The above is the code that I use to get an array (possDrumSounds) full of all .aif file paths. Looking at it again, it may have to do with the fact that I said inDirectory:nil, but that shouldn't matter.


Try cleaning your target and re-building.


Interestingly, this has been resolved. It appears that for some reason xcode and the iphone simulator retain all of the resources in the bundle. (At least in my case). This was remedied when I tested it on the device which did not have all of the extra sounds.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜