I am lost here. I try to initialize a UIImage object with the method. I understand that the it looks in the documents dir etc and does not cache…
I provide respective URLs or paths but the object is always nil.
The method is never succesful.
Is it because my paths always contain the file prefix at the beginning?
Like this?
file://.somedir/somedir/etc…/filename.jpg
I create the path by getting the docs directory with this call
//get the documents directory path
NSURL *docsPath = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
// create the full image local path
NSString *imageLocalPath = [NSString stringWithFormat:@"%@%u.jpg", docsPath, indexPath.row + 1];
and then constructing the path string.
This
is really this
which is not at all what you want.
Try something like this:-