Returns a new key path created by appending the given key path to this one.
- Xcode 9.0+
- Swift Standard Library
The key path to append.
A key path from the root of this key path to the value type of
path can be appended. If
path can’t be appended, returns
Use this method to extend this key path to the value type of another key path. Appending the key path passed as
path is successful only if the root type for
path matches this key path’s value type. This example creates a key path from
String, and then tries appending compatible and incompatible key paths:
The second call to
nil because the root type of the
Double, does not match the value type of