i quite new in ios development , objective-c , appreciate help.
i created group folder
in xcode placed images. images inside project folder.
i want iterate through xcode folder routineicons
, images have b-
in name , put name , extension array.
could point me in right direction on how this? bah.. possible??
you can use snipped:
nsmutablearray *result = [nsmutablearray array]; [[[nsbundle mainbundle] pathsforresourcesoftype:@"png" indirectory:nil] enumerateobjectsusingblock:^(nsstring *obj, nsuinteger idx, bool *stop) { nsstring *path = [obj lastpathcomponent]; if ([path hasprefix:@"b-"]) { [result addobject:path]; } }];
Comments
Post a Comment