Instance Method

mutableCopy(with:)

Returns a new instance that’s a mutable copy of the receiver.

Required.

Declaration

func mutableCopy(with zone: NSZone? = nil) -> Any

Parameters

zone

This parameter is ignored. Memory zones are no longer used by Objective-C.

Discussion

The returned object is implicitly retained by the sender, which is responsible for releasing it. The copy returned is mutable whether the original is mutable or not.

See Also

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software