0

In my application I have two different imageviews with different images.My second imageview is smaller than first imageview.User can change position of second image using UITouch events.Now,I want to save that two images as single image with changed position.Here is my code to change position of image :

-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:touch.view];
cloud.center = location;
}

-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[self touchesBegan:touches withEvent:event];

It's working fine but, How to merge two imageview in one imageview? Please help me.Thanks in advance.

1 Answers1

0

Make a third UIImageView and then use

[thirUIVIew addSubview: firstUIView]; [thirUIVIew addSubview: secondUIView];

You can swap the order of those two statements and get one over the other.

If you do that, u can use that third uiview like one, but later if you need you can get thirdView's subviews.

Sorry for my english :)

Rievo
  • 79
  • 4