4

i am trying to preview image on qlpreviewcontroller. i had implemented these methods.

- (NSInteger) numberOfPreviewItemsInPreviewController: (QLPreviewController *) controller
{
    return 1;
}


- (id <QLPreviewItem>)previewController: (QLPreviewController *)controller previewItemAtIndex:(NSInteger)index
{
    // Break the path into its components (filename and extension)

    return [NSURL fileURLWithPath:imageFilePath];
}

but problem is that i had images saved in database in form of base64. qlpreviewcontroller needs filepath to display item.

i have only option for this is to save that image in document than preview it from that path. but is their any better option. that i can display that uiimage directly ...

ShujatAli
  • 1,376
  • 2
  • 14
  • 26

0 Answers0