Instance Method

url(at:effectiveRange:)

Returns a URL, either from a link attribute or from text at the given location that appears to be a URL string, for use in automatic link detection.

Declaration

func url(at location: Int, effectiveRange: NSRangePointer) -> URL?

Parameters

location

The character index in the string at which the method checks for a link.

effectiveRange

The actual range covered by the link attribute or URL string, or of non-URL text if no apparent URL is found.

Return Value

The URL found at location.

See Also

Deprecated Methods

init?(path: String, documentAttributes: AutoreleasingUnsafeMutablePointer<NSDictionary?>?)

Initializes a new attribute string object from RTF or RTFD data contained in the file at the given path.

Deprecated
init?(url: URL, documentAttributes: AutoreleasingUnsafeMutablePointer<NSDictionary?>?)

Initializes a new attributed string object from the data at the given URL.

Deprecated
init(fileURL: URL, options: [AnyHashable : Any], documentAttributes: AutoreleasingUnsafeMutablePointer<NSDictionary?>?)

Initializes a new attributed string object from the data at the given URL.

Deprecated
var containsAttachments: Bool

Returns whether the attribute string contains any attachment attributes.

Deprecated
func draw(with: NSRect, options: NSString.DrawingOptions)

Draws the receiver with the specified options, within the given rectangle in the current graphics context.

Deprecated
func boundingRect(with: NSSize, options: NSString.DrawingOptions) -> NSRect

Calculates and returns bounding rectangle for the receiver drawn using the options specified, within the given rectangle in the current graphics context.

Deprecated