I have a PDF file stored in the App document Folder.
I have a PDFView as a sub-view on my viewcontroller's view. I can load the PDF from the file and display it. No problem.
However, depending on the size of the PDF, the PDFView can take a while to load.
I'm using Objective-C.
Heres my code:
- (void)loadDocument {
_pdfView.document = [_fileFromThirdParty pdfDocument];
}
Where _pdfView is defined:
@property (strong, nonatomic) IBOutlet PDFView *pdfView;
I want to do something when the document has loaded into the view.
So, we have PDFDocument defined within PDFView. Examining both objects shows that we have notifications posted when pages are changed, etc. But I cannot find anything the fires when the document has successfully loaded into the view.
I was hoping for a delegate method like:
- (void)pdfView:(PDFView *)pdfView pdfHasLoaded:(BOOL)pdfHasLoaded {
// Great - I can do something...!
}
I want to add a dark view to the Window (to show activity) and remove this when the PDF has loaded. I've trounced Google and SO. Nothing so obvious.
And to be clear, I'm not pulling this from a URL on a server. This is a simply load from the document bundle.
Anyone any ideas here.