init(HTML:baseURL:documentAttributes:)
Creates an attributed string from the HTML in the specified data object and base URL.
Declaration
init?(HTML data: Data, baseURL base: URL, documentAttributes dict: AutoreleasingUnsafeMutablePointer<NSDictionary?>?)init?(html data: Data, baseURL base: URL, documentAttributes dict: AutoreleasingUnsafeMutablePointer<NSDictionary?>?)Parameters
- data:
A data object with text in HTML format. The method uses this data to create the attributed string.
- base:
An Nsurl that represents the base URL for all links within the HTML.
- dict:
An in-out dictionary containing document-level attributes. On output, this method updates the dictionary to contain any document-specific keys found in the data. Specify
nilif you don’t want the document attributes.
Return Value
Returns an initialized object, or nil if the data can’t be decoded.