PlaygroundQuickLook

enum PlaygroundQuickLook

The sum of types that can be used as a quick look representation.

Import import Swift

Cases

case Text(String)

Plain text.

Declaration

case Int(Int64)

An integer numeric value.

Declaration

case UInt(UInt64)

An unsigned integer numeric value.

Declaration

case Float(Float32)

A single precision floating-point numeric value.

Declaration

case Double(Float64)

A double precision floating-point numeric value.

Declaration

case Image(Any)

An image.

Declaration

case Sound(Any)

A sound.

Declaration

case Color(Any)

A color.

Declaration

case BezierPath(Any)

A bezier path.

Declaration

case AttributedString(Any)

An attributed string.

Declaration

case Rectangle(Float64, Float64, Float64, Float64)

A rectangle.

Uses explicit coordinates to avoid coupling a particular Cocoa type.

Declaration

case Point(Float64, Float64)

A point.

Uses explicit coordinates to avoid coupling a particular Cocoa type.

Declaration

case Size(Float64, Float64)

A size.

Uses explicit coordinates to avoid coupling a particular Cocoa type.

Declaration

case Logical(Bool)

A logical value.

Declaration

case Range(Int64, Int64)

A range.

Uses explicit values to avoid coupling a particular Cocoa type.

Declaration

case View(Any)

A GUI view.

Uses an Any to avoid coupling a particular Cocoa type.

Declaration

case Sprite(Any)

A graphical sprite.

Uses an Any to avoid coupling a particular Cocoa type.

Declaration

case URL(String)

A Uniform Resource Locator.

Declaration

Initializers

init(reflecting:)

Initialize for the given subject.

If the dynamic type of subject conforms to CustomPlaygroundQuickLookable, returns the result of calling its customPlaygroundQuickLook method. Otherwise, returns a PlaygroundQuickLook synthesized for subject by the language. Note that in some cases the result may be .Text(String(reflecting: subject)).

Note: If the dynamic type of subject has value semantics, subsequent mutations of subject will not observable in Mirror. In general, though, the observability of such mutations is unspecified.

Declaration

init(reflecting subject: Any)