CatNiP prefinal
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
|
An abstract, immutable class for displaying document data. More...
#import <UIDocument.h>
Public Member Functions | |
(UIImage *) | - getImageOfPage: |
Draws and returns an image of the specified page of the document. | |
(CGSize) | - getSizeOfPage: |
Returns the size of the specified page. | |
(id) | - initWithContentsOfFile: |
Initializes and returns the document object with the contents of the specified file. | |
(id) | - initWithData: |
Initializes and returns the document object with the specified data. | |
Static Public Member Functions | |
(UIDocument *) | + documentWithContentsOfFile: |
Creates and returns a document object by loading the document data from the file at the specified path. | |
(UIDocument *) | + documentWithData: |
Creates and returns a document object that uses the specified document data. | |
Properties | |
int | numberOfPages |
The number of pages in the document. | |
CGSize | size |
The dimensions of the entire document, in points, when its pages are vertically concatenated with zero margins. |
An abstract, immutable class for displaying document data.
The UIDocument class is a sister class to UIImage as a high-level way to display document data. UIDocument itself is an abstract class; subclasses need to provide concrete functionality for different document file types. When subclassing UIDocument, DO NOT CALL THE SUPERCLASS IMPLEMENTATION in the methods you override: as Objective-C does not actually support abstract classes, the feature has been emulated by defining every method in the UIDocument interface as throwing a NSInternalConsistencyException.
Subclasses of UIDocument should respect document transparency. If a document has been defined with no background color or a transparent one, it is the responsibility of view objects to provide a background against which the document is readable.
Created by Lari O Rasku, tkol on 6/13/11. Copyright 2011 __MyCompanyName__. All rights reserved.
Definition at line 11 of file UIDocument.h.
+ (UIDocument *) documentWithContentsOfFile: | (NSString *) | path |
Creates and returns a document object by loading the document data from the file at the specified path.
path | The full or partial path to the file. |
Definition at line 34 of file UIDocument.m.
+ (UIDocument *) documentWithData: | (NSData *) | data |
Creates and returns a document object that uses the specified document data.
data | The document data. This can be data from a file or data you create programmatically. |
Definition at line 46 of file UIDocument.m.
- (UIImage *) getImageOfPage: | (int) | pageNumber |
Draws and returns an image of the specified page of the document.
pageNumber | The number of the page, starting from 1. |
Reimplemented in UIDocumentPDF.
Definition at line 85 of file UIDocument.m.
- (CGSize) getSizeOfPage: | (int) | pageNumber |
Returns the size of the specified page.
pageNumber | The number of the page, starting from 1. |
Reimplemented in UIDocumentPDF.
Definition at line 98 of file UIDocument.m.
- (id) initWithContentsOfFile: | (NSString *) | path |
Initializes and returns the document object with the contents of the specified file.
path | The path to the file. |
Reimplemented in UIDocumentPDF.
Definition at line 58 of file UIDocument.m.
- (id) initWithData: | (NSData *) | data |
Initializes and returns the document object with the specified data.
data | The data object containing the document data. |
Reimplemented in UIDocumentPDF.
Definition at line 71 of file UIDocument.m.
- (int) numberOfPages [read, assign] |
The number of pages in the document.
Definition at line 13 of file UIDocument.h.
- (CGSize) size [read, assign] |
The dimensions of the entire document, in points, when its pages are vertically concatenated with zero margins.
Page orientation is taken into account.
Definition at line 12 of file UIDocument.h.