So I want to duplicate a UIView - and by duplication I mean duplicate everything, including its bounds, frame, size, coordinates, sense of what is its superview etc. This UIView has an image inside of it - I need to retain that image too.
Can anyone please tell me a straightforward way to do this? I looked at this - UIView duplicate but that doesn't seem to work with UIImage, plus is giving me an error saying "unrecognized selector sent to...".
Basically, I am picking a UIView out of a grid of UIViews, and when I pick the UIView out (containing an image), I need to create a copy of the UIView which will replace it. If you have any other suggestions on how to go about doing this, they are more than welcome too.