---
title: "copyWithZone:"
framework: objectivec
role: symbol
role_heading: Type Method
path: "objectivec/nsobject-swift.class/copywithzone:"
---

# copyWithZone:

Returns the receiver.

## Declaration

```occ
+ (id) copyWithZone:(struct _NSZone *) zone;
```

## Parameters

- `zone`: This argument is ignored.

## Return Value

Return Value The receiver.

## Discussion

Discussion This method exists so class objects can be used in situations where you need an object that conforms to the NSCopying protocol. For example, this method lets you use a class object as a key to an NSDictionary object. You should not override this method.

## See Also

### Creating, Copying, and Deallocating Objects

- [alloc](objectivec/nsobject-swift.class/alloc.md)
- [allocWithZone:](objectivec/nsobject-swift.class/allocwithzone:.md)
- [init()](objectivec/nsobject-swift.class/init().md)
- [copy()](objectivec/nsobject-swift.class/copy().md)
- [mutableCopy()](objectivec/nsobject-swift.class/mutablecopy().md)
- [mutableCopyWithZone:](objectivec/nsobject-swift.class/mutablecopywithzone:.md)
- [dealloc](objectivec/nsobject-swift.class/dealloc.md)
- [new](objectivec/nsobject-swift.class/new.md)
