-
copy(with:for:)Extension methodCreates a copy of this object, replacing the value at the given key path by the provided value.
Declaration
Swift
func copy<T>(with value: T, for path: WritableKeyPath<Self, T>) -> SelfParameters
valueNew value for the field in the copy.
pathKey path of the field that will be modified in the copy.
Return Value
A copy of this value with the modified field.
Install in Dash
AutoOptics Protocol Reference