I'm using QLPreviewController object in order to load documents in my app.
This is the code that loads the file:
fileURL = [NSURL fileURLWithPath:appFile];
QLPreviewController *previewController = [[QLPreviewController alloc] init];
previewController.dataSource = self;
previewController.delegate = self;
previewController.currentPreviewItemIndex = 0;
previewController.view.frame = CGRectMake(0, 26, self.view.frame.size.width, self.view.frame.size.height - 26);
lblTitle.text = [appFile lastPathComponent];
[self.view addSubview:previewController.view];
Works fine, the docs are loaded.
The problem is when I try to load a document larger than 10 MB. In example a Powerpoint doc with 12 slides with images.
I've used instruments and according with allocations tool the app grows till > 20 MB and crashes.
Anyone knows the better way to load documents in QLPreviewController or other class?
Thanks.