NSAttributedString

Undocumented

  • Mechanica

    Initializes and returns a new NSAttributedString object from the html contained in the given string. - Parameters: - html: an HTML string. - allowLossyConversion: If flag is true and the receiver can’t be converted without losing some information, some characters may be removed or altered in conversion. For example, in converting a character from NSUnicodeStringEncoding to NSASCIIStringEncoding, the character ‘Á’ becomes ‘A’, losing the accent.. - Note: The HTML import mechanism is meant for implementing something like markdown (that is, text styles, colors, and so on), not for general HTML import. Apple Documentation - Warning: Using the HTML importer (NSHTMLTextDocumentType) is only possible on the main thread.

    Declaration

    Swift

    public convenience init?(html: String, allowLossyConversion: Bool = false)

    Parameters

    html

    an HTML string.

    allowLossyConversion

    If flag is and the receiver can’t be converted without losing some information, some characters may be removed or altered in conversion. For example, in converting a character from NSUnicodeStringEncoding to NSASCIIStringEncoding, the character ‘Á’ becomes ‘A’, losing the accent..

  • Mechanica

    Returns a new NSAttributedString appending the right NSAttributedString to the left NSAttributedString.

    Declaration

    Swift

    static public func + (lhs: NSAttributedString, rhs: NSAttributedString) -> NSAttributedString
  • Mechanica

    Returns a new NSAttributedString appending the right NSAttributedString to the left String.

    Declaration

    Swift

    static public func + (lhs: String, rhs: NSAttributedString) -> NSAttributedString