Use key-path expressions to access properties dynamically.
Key-Path Expressions
Topics
Key Paths
class Key Path
A key path from a specific root type to a specific resulting value type.
class Partial Key Path
A partially type-erased key path, from a concrete root type to any resulting value type.
class Any Key Path
A type-erased key path, from any root type to any resulting value type. NOTE: older runtimes had Swift.AnyKeyPath as the ObjC name. The two must coexist, so it was renamed. The old name must not be used in the new runtime. _TtCs11_AnyKeyPath is the mangled name for Swift._AnyKeyPath.
protocol _Append Key Path
An implementation detail of key path expressions; do not use this protocol directly.
Writable Key Paths
class Writable Key Path
A key path that supports reading from and writing to the resulting value.
class Reference Writable Key Path
A key path that supports reading from and writing to the resulting value with reference semantics.
See Also
Programming Tasks
Print values to the console, read from and write to text streams, and use command line arguments.
Fortify your code with runtime checks, and examine your values' runtime representation.
Allocate and manage memory manually.
Perform casts between types or represent values of any type.
Use imported C types or call C variadic functions.
Work with prefix, postfix, and infix operators.