Instance Method

mutableCopy()

Returns the object returned by mutableCopy(with:) where the zone is nil.

Declaration

func mutableCopy() -> Any

Return Value

The object returned by the NSMutableCopying protocol method mutableCopy(with:), where the zone is nil.

Discussion

This is a convenience method for classes that adopt the NSMutableCopying protocol. An exception is raised if there is no implementation for mutableCopy(with:).

See Also

Creating, Copying, and Deallocating Objects

init()

Implemented by subclasses to initialize a new object (the receiver) immediately after memory for it has been allocated.

func copy() -> Any

Returns the object returned by copy(with:).