I did something similar a few years ago. At first I tried to use the CGImageMaskCreate material, but it was much simpler just to create an image with transparent βcutoutsβ, and then use the animation effects to scroll the images under it.
In your case, I would find a screen-sized image of laundry. Then I used the image editor (I use GIMP) to draw a number of drawers on the laundry using a flat color. Then I outlined this color box transparent to make cutouts. There are other ways to do this, but the way I do it.
In the application, add two or more images to the main screen. Do not worry about placement, because it will be determined at runtime. You want these image views to contain the images you want to scroll. Then add your linen-with-cutout UIImageView so that it is on top and it occupies the entire screen size. Make sure the top background of the UIImageView is set to transparent.
When the application starts, place your βbottomβ images, top to bottom, and then run [UIView beginAnimation], which scrolls the images under the images up, changing the βyβ position. This animation should have a callback made, which is called when the top view of the image is completely disconnected from the screen. Then, in the callback made, return the current state and start the animation again. Here are the guts of the code I used (but note that my scroll was from right to left, not from bottom to top, and my images were the same size.)
- (void)doAnimationSet { [iv1 setFrame:CGRectMake(0, 0, imageWidth, imageHeight)]; [iv2 setFrame:CGRectMake(imageWidth, 0, imageWidth, imageHeight)]; [iv3 setFrame:CGRectMake(imageWidth*2, 0, imageWidth, imageHeight)]; [self loadNextImageSet]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:10]; [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [iv1 setFrame:CGRectMake(-imageWidth, 0, imageWidth, imageHeight)]; [iv2 setFrame:CGRectMake(0, 0, imageWidth, imageHeight)]; [iv3 setFrame:CGRectMake(imageWidth, 0, imageWidth, imageHeight)]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(doneAnimation:finished:context:)]; [UIView commitAnimations]; } - (void)doneAnimation:(NSString *)aid finished:(BOOL)fin context:(void *)context { [self doAnimationSet]; }
This should give you the effect you are looking for. Good luck :)