pointer(to:)
Obtain a mutable pointer to the stored property referred to by a key path.
Declaration
func pointer<Property>(to property: WritableKeyPath<Pointee, Property>) -> UnsafeMutablePointer<Property>?Parameters
- property:
A
WritableKeyPathwhoseRootisPointee.
Return Value
A mutable pointer to the stored property represented by the key path, or nil.
Discussion
If the key path represents a computed property, this function will return nil.