Creates a rectangle from a canonical dictionary representation.


init?(dictionaryRepresentation dict: CFDictionary)



A dictionary containing x, y, width, and height values for the rectangle to create, in the format used by the dictionaryRepresentation property.

Return Value

A rect structure with the origin and size specified in the dictionary, or nil if a rectangle value cannot be found in the dictionary.

See Also

Alternate Representations

var dictionaryRepresentation: CFDictionary

Returns a dictionary representation of the provided rectangle.

var customMirror: Mirror

A representation of the rectangle’s structure and display style for use in debugging.

var customPlaygroundQuickLook: PlaygroundQuickLook

A representation of the rectangle for use in Playgrounds.


Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software