Description: class implementing a protocol for searching in PDF document with sending notifications on search events.
#import <Foundation/Foundation.h> #import "MAProceduralReportDataViewController.h" // Class implementing a delegate protocol for searching in PDF document with sending notifications on search events @interface SearchDelegateWithNotifications : NSObject<PdfSearchDelegate> // Executes operations required on finding specified text on page - (void) foundOnPageIndex:(int)index; // Executes operations required after finishing search in PDF document - (void) searchFinished; @end
#import "SearchDelegateWithNotifications.h" @implementation SearchDelegateWithNotifications // Executes operations required on finding specified text on page - (void) foundOnPageIndex:(int)index
{ // Sends notification about found match with specified string in regular report [[NSNotificationCenter defaultCenter] postNotificationName:@"resultsCountChanged" object:nil]; } // executes operations required after finishing search in PDF document - (void) searchFinished
{ // Sends notification on search finish [[NSNotificationCenter defaultCenter] postNotificationName:@"searchFinished" object:nil]; } @end
See also: