ios - How to have multiple image paths in array? -


i need display both .png's , .jpg's, unsure of how display both. code below works:

nsarray *imagepaths = [[nsbundle mainbundle] pathsforresourcesoftype:@"png" indirectory:@"carseats"]; 

but doesn't:

nsarray *imagepaths = [[nsbundle mainbundle] pathsforresourcesoftype:@"png, jpg" indirectory:@"carseats"]; 

get png , jpg paths separately , combine arrays:

nsarray *pngpaths = [[nsbundle mainbundle] pathsforresourcesoftype:@"png"                                                        indirectory:@"carseats"]; nsarray *jpgpaths = [[nsbundle mainbundle] pathsforresourcesoftype:@"jpg"                                                        indirectory:@"carseats"]; nsarray *imagepaths = [pngpaths arraybyaddingobjectsfromarray:jpgpaths]; 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -