NSAttributedString

Undocumented

  • Replaces html tags in an attributed string with the given attributes.

    Parameter

    Parameter tag: The tag to replace without opening and closing <> e.g. strong =

    Parameter

    Parameter withAttributes: A dictionary [String: AnyObject] of attributes

    Returns

    NSAttributedString - the tag replaced by the given attributes.

    Declaration

    Swift

    public func replaceHTMLTag(tag: String, withAttributes attributes: [String: AnyObject]) -> NSAttributedString

    Parameters

    tag

    The tag to replace without opening and closing <> e.g. strong =

    withAttributes

    A dictionary [String: AnyObject] of attributes

    Return Value

    NSAttributedString - the tag replaced by the given attributes.