I am trying to make a copy of my UIViewController subclass by doing:
BookViewController *bookVC = [catalogFlatViewController copy];
and I have the following error:
'-[BookViewController copyWithZone:]: unrecognized selector sent to instance 0x8e5f00'
UIViewControllerdoes not conform toNSCopying. If you want to make a copy, you have to useNSCoding:If you’ve added new ivars to your view controller, you’ll have to override the
NSCodingmethods (encodeWithCoder:andinitWithCoder:) to serialize and deserialize these correctly. See Archives and Serializations Programming Guide.BTW, this is basically how a nib file works.