concept didisguise in category ios
appears as: DIDisguise, DIDisguise

This is an excerpt from Manning's book Hello! iOS Development.
OK, that’s nice, but this only works if DIDisguise can overlay disguises. Add this message to Disguise, and don’t forget to declare it in Disguise’s header:
-(UIImage*) overlayDisguisesOnFace:(UIImage *)face { UIImage *newFace = face; for (DIDisguiseElement *d in self.elements) { newFace = [d overlayOnFace:newFace]; } return newFace; }See what you’re doing? You’re making each model class responsible for its part. DIDisguise is responsible for telling elements that they’re supposed to overlay, but elements do the heavy lifting. Here’s what’s happening.