Edit AllPages

A formal protocol objects can adopt to make copies of themselves. From Apple’s docs:

* The NSCopying protocol declares a method for providing functional copies of an object. The exact meaning of �copy� can vary from class to class, but a copy must be a functionally independent object with values identical to the original at the time the copy was made. A copy produced with NSCopying is implicitly retained by the sender, who is responsible for releasing it. *


Here’s a great page detailing how you might go about implementing -copyWithZone: [] []

For threaded discussion, see ImplementingNSCopying