Deep copy Objective-C objects with UIImageView as property
问题 I have an object with properties that are NSString, UIImageView and simple vars like BOOL, int and float. I'm trying to create a deep copy of the object. For that I've implemented the NSCopying protocol to my class and the copyWithZone method like: -(id)copyWithZone:(NSZone *)zone { iItem *clone = [[iItem alloc] init]; //iItem *clone = [super copyWithZone:zone]; clone.originalTransform = self.originalTransform; clone.initialTransform = self.initialTransform; clone.originalFrame = self