---
title: NSMutableCopying
framework: foundation
role: symbol
role_heading: Protocol
path: foundation/nsmutablecopying
---

# NSMutableCopying

A protocol that mutable objects adopt to provide functional copies of themselves.

## Declaration

```swift
protocol NSMutableCopying
```

## Overview

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. NSMutableCopying declares one method, mutableCopy(with:), but mutable copying is commonly invoked with the convenience method mutableCopy(). The mutableCopy() method is defined for all NSObjects and simply invokes mutableCopy(with:) with the default zone. If a subclass inherits NSMutableCopying from its superclass and declares additional instance variables, the subclass has to override mutableCopy(with:) to properly handle its own instance variables, invoking the superclass’s implementation first.

## Topics

### Copying

- [mutableCopy(with:)](foundation/nsmutablecopying/mutablecopy(with:).md)

## Relationships

### Conforming Types

- [NSArray](foundation/nsarray.md)
- [NSAttributedString](foundation/nsattributedstring.md)
- [NSCharacterSet](foundation/nscharacterset.md)
- [NSCountedSet](foundation/nscountedset.md)
- [NSData](foundation/nsdata.md)
- [NSDictionary](foundation/nsdictionary.md)
- [NSIndexSet](foundation/nsindexset.md)
- [NSMutableArray](foundation/nsmutablearray.md)
- [NSMutableAttributedString](foundation/nsmutableattributedstring.md)
- [NSMutableCharacterSet](foundation/nsmutablecharacterset.md)
- [NSMutableData](foundation/nsmutabledata.md)
- [NSMutableDictionary](foundation/nsmutabledictionary.md)
- [NSMutableIndexSet](foundation/nsmutableindexset.md)
- [NSMutableOrderedSet](foundation/nsmutableorderedset.md)
- [NSMutableSet](foundation/nsmutableset.md)
- [NSMutableString](foundation/nsmutablestring.md)
- [NSMutableURLRequest](foundation/nsmutableurlrequest.md)
- [NSOrderedSet](foundation/nsorderedset.md)
- [NSPurgeableData](foundation/nspurgeabledata.md)
- [NSSet](foundation/nsset.md)
- [NSString](foundation/nsstring.md)
- [NSURLRequest](foundation/nsurlrequest.md)

## See Also

### Copying

- [NSCopying](foundation/nscopying.md)
