//For Getting particular named images from the project
NSMutableArray *any=[[NSMutableArray alloc] init];
NSString *bundleRoot = [[NSBundle mainBundle] bundlePath];
NSArray *dirContents = [[NSFileManager defaultManager] directoryContentsAtPath:bundleRoot];
for (NSString *tString in dirContents) {
if ([tString hasPrefix:@"Fire Type1"] && [tString hasSuffix:@".png"]) {
[any addObject:tString];
}
}
NSLog(@"%@",any);
NSMutableArray *any=[[NSMutableArray alloc] init];
NSString *bundleRoot = [[NSBundle mainBundle] bundlePath];
NSArray *dirContents = [[NSFileManager defaultManager] directoryContentsAtPath:bundleRoot];
for (NSString *tString in dirContents) {
if ([tString hasPrefix:@"Fire Type1"] && [tString hasSuffix:@".png"]) {
[any addObject:tString];
}
}
NSLog(@"%@",any);
No comments:
Post a Comment