By rule ,for displaying the image in iOS,the image has to be in the project folder in of same project. If i have images in folder other than project folder, is there any way to import the images dynamically to the project and display on the iOS screen?
Asked
Active
Viewed 382 times
0
-
1Try this answer http://stackoverflow.com/questions/220630/how-to-share-custom-data-between-iphone-applications – Rui Peres Jun 13 '12 at 06:39
1 Answers
0
When you say "project folder" do you mean the bundle? If so, you can store the dynamically retrieved images to your app's documents folder and retrieve them from there, e.g. get the documents folder via:
NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
And then you can use that documentsPath in your imageWithContentsOfFile
and load your UIImages that way.
Or when you say "project folder" do you mean both the app's document folder as well as the bundle? If so, then you have to explain where these images are and what you're trying to do.

Rob
- 415,655
- 72
- 787
- 1,044