There are a number of posts very similar and I've tried the suggestions from those but the error message persists. I don't believe I had the issue until going to IOS 8 but can't be sure.
I am previewing a PDF document. From a Master/detail view controller, I open an action sheet from the detail toolbar, then user selects an option to preview the PDF file. The file displays then the error shows.
I understand that it is due to one view trying to display while there is still an animation but I tried putting in delays, removing animation as suggested in some posts, but nothing works.
case 2: // preview the PDF file
{
// get a temprorary filename for this PDF
self.pdfFilePath = [path stringByAppendingPathComponent:@"Meeting Minutes.pdf"];
[MMPDFRenderer createPDF:@"Minutes" Meeting:_meetingItem PDFFileName:_pdfFilePath];
// present preview.
[self dismissViewControllerAnimated:YES completion:^{
self.preview = [[MMPreviewController alloc] initWithNibName:nil bundle:nil];
self.preview.delegate = self;
self.preview.dataSource = self;
[self presentViewController:self.preview animated:YES completion:nil];
}];
}
break;
The MMPreviewController.M file..
#import "MMPreviewController.h"
@interface MMPreviewController ()
@end
@implementation MMPreviewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (BOOL)prefersStatusBarHidden
{
return YES;
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
and the MMPreviewController.h..
#import <UIKit/UIKit.h>
#import <QuickLook/QuickLook.h>
@interface MMPreviewController : QLPreviewController
@end
Any help would be most appreciated.