I have two images, the first one is a foreground and the second one is the background.
I want to merge both of them into a single Image.I want to be able to drag and drop the frontImage
into only the background
is it possible ?
Asked
Active
Viewed 144 times
0

Lebyrt
- 1,376
- 1
- 9
- 18

user2858284
- 71
- 1
- 9
-
don't understand what you're asking. Can you post some pictures? – nielsbot Oct 27 '13 at 17:41
-
Do you want to learn how to drag one image onto the second or do you want to learn how to merge them? – emreoktem Oct 27 '13 at 20:11
-
Exactly,I want to learn how to drag one image into the second – user2858284 Oct 28 '13 at 11:04
-
o.O I really don't understand what you want to do :| – Lord Zsolt May 08 '14 at 07:39
1 Answers
0
This can be super easy.
For example - You have a parent UIView and two image views:
UIView *_baseView; //as big as the screen.
UIImageView *_backgroundImageView; //as a subview on _baseView
UIImageView *_frontImageView; //as a subview on _baseView
Then You implement some kind of UIImageView movement by finger (for example How do you make an image follow your finger in objective-c? or search for something similar to know how to move UIView objects around if You don't know yet how).
And - once You release Your finger - You can take a screenshot from _baseView and get the image, where two subview ImageViews are combined in a way.
(How Do I Take a Screen Shot of a UIView? or search something similar).
If You don't like, that You have to take screenshot of _baseView, You could also add frontImageView as a subview to background image view and get the screenshot from backgroundImageView.
Hope this idea helps.

Community
- 1
- 1

Guntis Treulands
- 4,764
- 2
- 50
- 72