Protocol: NSMutableCopying

Overview

The NSMutableCopying protocol declares a method for providing mutable copies of an object. Only classes that define an “immutable vs. mutable” distinction should adopt this protocol. Classes that don’t define such a distinction should adopt NSCopying instead.Returns a new instance that’s a mutable copy of the receiver. (required)

Instance Method Summary (collapse)

Instance Method Details

- (Object) mutableCopyWithZone(zone)

Returns a new instance that’s a mutable copy of the receiver. (required) 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.

Parameters:

  • zone (NSZone)

    The zone from which memory is allocated for the new instance. If zone is NULL, the new instance is allocated from the default zone, which is returned by NSDefaultMallocZone.

Returns: