Use NSCopy() to Duplicate Objects in Swift

Photo by Duy Pham on Unsplash

Copying objects (reference types) is quite often challenging. How are you supposed to make sure they copy properly if you are using Boxing?

Enter NSCopy()

Difficulty: Beginner | Easy | Normal | Challenging

Prerequisites:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store