Question

i'm using quicklook to preview an image saved locally. when i run the app, quicklook read the right file and has the right image memory but doesn't preview it. it shows me something like this.

enter image description here

in my code i'm passing an NSURL to this delegate method

(id)previewController:(QLPreviewController *)previewController previewItemAtIndex:(NSInteger)idx so i guess everything is in place. but what could i missing?

EDIT: to creath the path i do it by the following:

filePath = [NSString stringWithFormat:@"%@/LeBaccPictureDownloadedTemperoraly", [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]];

and in the delegate method i mentioned i return the url by this:

[NSURL fileURLWithPath:filePath];
Was it helpful?

Solution

does filePath = [@"~/Documents/LeBaccPictureDownloadedTemperoraly" stringByExpandingTildeInPath]; change anything? Does the file have an extension? Try to show the file in an UIImageView to make sure the file is not broken. Whatch the file format xD

Like this?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top