Can someone tell me how can one override -copyWithZone:
Assuming I have one NSString object, NSInteger object as class members.
Subclass the class for which you need to override copyWithZone:
.
Your sublclass should use the method similar to below:
- (id)copyWithZone:(NSZone *)zone {
YourClass *copy = [[YourClass alloc] initWith...:<value>];
return copy;
}