DTWebArchive Class Reference
| Inherits from | NSObject |
| Declared in | DTWebArchive.h |
Overview
A DTWebArchive object represents a webpage that can be archived—for example, archived on disk or on the pasteboard. A DTWebArchive object contains the main resource, as well as the subresources and subframes of the main resource. The main resource can be an entire webpage, a portion of a webpage, or some other kind of data such as an image. Use this class to archive webpages, or place a portion of a webpage on the pasteboard, or to represent rich web content in any application.
Instance Methods
data
Returns the data representation of the receiver.
- (NSData *)dataDiscussion
The data returned can be used to save the web archive to a file, to put it on the pasteboard using the WebArchivePboardType type, or used to initialize another web archive using the initWithData: method.
Declared In
DTWebArchive.hinitWithData:
Initializes and returns the receiver.
- (id)initWithData:(NSData *)dataParameters
- data
The initial content data.
Discussion
Use the data method to get the receiver’s data.
Declared In
DTWebArchive.hinitWithMainResource:subresources:subframeArchives:
Initializes the receiver with a resource and optional subresources and subframe archives.
- (id)initWithMainResource:(DTWebResource *)mainResource subresources:(NSArray *)subresources subframeArchives:(NSArray *)subframeArchivesParameters
- mainResource
The main resource for the archive.
- subresources
An array of DTWebResource objects or
nilif none are specified.
- subframeArchives
An array of
objects used by the sub frames or nilif none are specified.
Discussion
This method initializes and returns the receiver.
Declared In
DTWebArchive.hmainResource
Returns the receiver’s main resource.
- (DTWebResource *)mainResourceDeclared In
DTWebArchive.h