Inherits from NSObject
Declared in YLAnnotationParser.h
YLAnnotationParser.m

Overview

YLAnnotationParser is responsible for parsing the annotations in a PDF file.

Tasks

Initialization

Annotation Methods

Instance Methods

annotationsForPage:

Returns the annotations for a specific page.

- (NSArray *)annotationsForPage:(NSUInteger)page

Parameters

page

Page number starting from 0.

Return Value

An array with YLAnnotation objects.

Discussion

Returns the annotations for a specific page.

Declared In

YLAnnotationParser.h

initWithDocument:

Initializes a YLAnnotationParser instance and returns it to the caller.

- (id)initWithDocument:(YLDocument *)document

Parameters

document

Reference to the document.

Return Value

An initialized YLAnnotationParser instance.

Discussion

Initializes a YLAnnotationParser instance and returns it to the caller.

Declared In

YLAnnotationParser.h

viewForAnnotation:frame:

Returns a view for a given annotation that conforms to the YLAnnotationView protocol.

- (UIView<YLAnnotationView> *)viewForAnnotation:(YLAnnotation *)annotation frame:(CGRect)frame

Parameters

annotation

Annotation object.

frame

Frame of the annotation in view coordinates. Use the viewRectForRect method in YLAnnotation to convert the annotation’s frame from PDF coordinates to view coordinates.

Return Value

A view that conforms to the YLAnnotationView protocol.

Discussion

Returns a view for a given annotation that conforms to the YLAnnotationView protocol.

Declared In

YLAnnotationParser.h