Are you able to edit images with QLPreviewController?
For example, preview an image and crop it? If not, what is the editing property on QLPreviewController for? It doesn't seem to change anything. (Previewing files is working fine)
Here is an example:
QLPreviewController *previewController=[[QLPreviewController alloc]init];
previewController.delegate=self;
previewController.dataSource=self;
[previewController setCurrentPreviewItemIndex:selectedIndex];
[previewController setEditing:YES animated:YES];
[self presentModalViewController:previewController animated:YES];
Delegate methods:
- (id <QLPreviewItem>)previewController:(QLPreviewController *)controller previewItemAtIndex:(NSInteger)index
{
file = [folder.files objectAtIndex:index];
controller.title = file.name;
CustomQLPreviewItem *customQLPreviewItem = [[CustomQLPreviewItem alloc] init];
customQLPreviewItem.previewItemURL = [NSURL fileURLWithPath:file.uri];
customQLPreviewItem.previewItemTitle = file.name;
return customQLPreviewItem;
}
- (NSInteger)numberOfPreviewItemsInPreviewController:(QLPreviewController *)controller
{
return folder.file.count;
}
QLPreviewController does not support editing in the way you are thinking.
the editing property is actually inherited from UIViewController and from here:
UIViewController Class Reference