Core Graphics
CGContextSetBlendMode(kCGBlendModeDifference);
, , ( ). ( ). , ( "" ).
CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0);
CGContextFillRect(context, frame);
, ( drawRect:) .
CGContextRef context = UIGraphicsGetCurrentContext();
CGImageRef img1 = [[UIImage imageNamed:@"Ygsvt.png"] CGImage];
CGImageRef img2 = [[UIImage imageNamed:@"ay5DB.png"] CGImage];
CGRect frame = CGRectMake(30, 30, 100, 100);
CGContextTranslateCTM(context, 0, frame.size.height);
CGContextScaleCTM(context, 1.0, -1.0);
CGContextDrawImage(context, frame, img1);
CGContextSetBlendMode(context, kCGBlendModeDifference);
CGContextDrawImage(context, frame, img2);
CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0);
CGContextFillRect(context, frame);