Usted sólo puede alinear juntos en un solo UIView (creo que incluso fuera de la pantalla, pero no lo he comprobado todavía) - y luego simplemente convertir ese UIView a un UIImage usando QuartzCode:
UIGraphicsBeginImageContext(myView.bounds.size);
[myView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
a continuación, convertir eso en un formato - como PNG en el postura:
NSData *imageData = UIImagePNGRepresentation(image);
Entonces el envío no debería ser demasiado difícil.
EDITAR Aquí es un ejemplo extendido también se puede ver durante 3 imágenes - por supuesto puede utilizar el Interface Builder y salidas en lugar de escribir todo - pero se puede copiar y pegar esto para tratar:
UIImageView *imgView1, *imgView2, *imgView3;
imgView1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image1"]];
imgView2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image2"]];
imgView3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image3"]];
imgView1.frame = CGRectMake(0, 0, 50, 50);
imgView2.frame = CGRectMake(50, 50, 100, 100);
imgView3.frame = CGRectMake(100, 100, 200, 200);
[referenceView addSubview:imgView1];
[referenceView addSubview:imgView2];
[referenceView addSubview:imgView3];
UIGraphicsBeginImageContext(referenceView.bounds.size);
[referenceView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *finalImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
resultView = [[UIImageView alloc] initWithImage:finalImage];
resultView.frame = CGRectMake(0, 0, 320, 480);
[self.view addSubview:resultView];
referenceView.hidden = YES;
NOTA He comprobado y UIView debe dibujarse/visible en el momento de llamar a renderInContext (puede estar fuera de pantalla pero no puede ocultarse o alfa = 0 porque se volverá invisible). Entonces, colócalo fuera de la pantalla o inmediatamente ocúltalo después del dibujo
mira esto - http://stackoverflow.com/questions/5299452/how-can-i-crop-an-image-with-mask-and-combine-it-with-another-image-background –
se basa opengl. Preferiré cualquier otra alternativa. –
El código que publiqué para ti funcionará en tantas imágenes como el teléfono pueda manejar en la memoria - mira mi respuesta actualizada con el código extendido – shein