Код:
UIGraphicsBeginImageContext(self.view.frame.size);
[paintingImage.image drawInRect:self.view.frame];
CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 10);
CGContextSetFillColorWithColor(UIGraphicsGetCurrentContext(), [UIColor whiteColor].CGColor);
CGContextFillRect(UIGraphicsGetCurrentContext(), CGRectMake(0, 0, 200, 200));
paintingImage.image=UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Видео о создании приложения для рисования радуги: http://www.youtube.com/watch?v=HGxf1Lity3k