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 *)data
Discussion
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.h
initWithData:
Initializes and returns the receiver.
- (id)initWithData:(NSData *)data
Parameters
- data
The initial content data.
Declared In
DTWebArchive.h
initWithMainResource:subresources:subframeArchives:
Initializes the receiver with a resource and optional subresources and subframe archives.
- (id)initWithMainResource:(DTWebResource *)mainResource subresources:(NSArray *)subresources subframeArchives:(NSArray *)subframeArchives
Parameters
- mainResource
The main resource for the archive.
- subresources
An array of DTWebResource objects or
nil
if none are specified.
- subframeArchives
An array of
objects used by the sub frames or nil
if none are specified.
Discussion
This method initializes and returns the receiver.
Declared In
DTWebArchive.h
mainResource
Returns the receiver’s main resource.
- (DTWebResource *)mainResource
Declared In
DTWebArchive.h