forum

Home / DeveloperSection / Forums / How can I find images using iPhone app?

How can I find images using iPhone app?

Tarun Kumar167610-Sep-2015

My app crashes when I do the following in the applicationDidFinishLaunching event in the app delegate:

_textures[mytex] = [[Texture2D alloc] initWithImage:
                    [UIImage imageNamed:@"color.png"]];

However when I replace @"color.png" with

@"/Users/MyUserName/Desktop/MyProjectFolder/color.png"

everything works fine. I've experimented with the relative path stuff for the color.png resource... but none of it has worked. How can I fix this? I'd like to just say @"color.png" for all the image resources (esp. since I did this in another app... where I was working directly with sample code).

So what is that magical setting?

Thanks!

Updated on 11-Sep-2015

Can you answer this question?


Answer

1 Answers

Liked By