Inherits from NSObject
Declared in YLDocumentScanner.h
YLDocumentScanner.m

Overview

YLDocumentScanner is responsible for searching the PDF file.

Tasks

Other Methods

Initialization

Properties

lastSearchText

Returns the last used search term.

@property (nonatomic, readonly) NSString *lastSearchText

Discussion

Returns the last used search term.

Declared In

YLDocumentScanner.h

searchDelegate

Reference to the delegate.

@property (nonatomic, assign) NSObject<YLSearchDelegate> *searchDelegate

Discussion

Reference to the delegate.

Declared In

YLDocumentScanner.h

searchResults

Returns an array with YLSearchResult objects. You can also set this property to nil if you want to remove the previous search results.

@property (nonatomic, retain) NSArray *searchResults

Discussion

Returns an array with YLSearchResult objects. You can also set this property to nil if you want to remove the previous search results.

Declared In

YLDocumentScanner.h

Instance Methods

cancelSearch

Cancels the ongoing search operation if any.

- (void)cancelSearch

Discussion

Cancels the ongoing search operation if any.

Declared In

YLDocumentScanner.h

initWithDocument:

Initializes a YLDocumentScanner instance and returns it to the caller.

- (id)initWithDocument:(YLDocument *)document

Parameters

document

Reference to the document.

Return Value

An initialized YLDocumentScanner instance

Discussion

Initializes a YLDocumentScanner instance and returns it to the caller.

Declared In

YLDocumentScanner.h

searchResultsForPage:

Returns the search results for a specific page.

- (NSArray *)searchResultsForPage:(NSUInteger)page

Parameters

page

Page number starting from 0.

Return Value

An array with YLSearchResult objects.

Discussion

Returns the search results for a specific page.

Declared In

YLDocumentScanner.h

searchText:

Use this method to search for text. This function will start an async search operation and will inform the caller via the delegate.

- (void)searchText:(NSString *)text

Parameters

text

The text to search for.

Discussion

Use this method to search for text. This function will start an async search operation and will inform the caller via the delegate.

Declared In

YLDocumentScanner.h