Reputation: 6323
I have strange behavior in my app. In My app i am using below code get images from resource folder..working fine at starting but if i test my app continuously one hour after that i am not getting any images from resource folder then in my all view coming without back ground image...
[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"box_s3_landscape" ofType:@"png"]]
Upvotes: 0
Views: 503
Reputation: 1977
[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"box_s3_landscape" ofType:@"png"]]
This line of code does not caches your Image.
try using [UIImage imageNamed@""];
Upvotes: 1
Reputation: 73688
Are you running this in Simulator? The Resources/iphone directory should work fine. This is a simulator-only issue, which has been resolved for 1.8.0
Upvotes: 0