I have a UIImageView object X that is contained in an TableView object A. I want to be able to touch X and remove it from object A and move it into object B (a UIView). Both Object A & B are inside of the SplitViewController.
A B
_____ _____
| | | |
| X | -> | |
|___| |___|
Is this possible at all?
Yes, this is possible.
Create a draggable UIView. Apple provides some sample code for that: MoveMe
When dragging starts, move the
UIViewX to the first common superview (someSuperview) of viewA and viewB:[someSuperview addSubview:viewX];Adjust the frame of viewX, so its absolute position will remain identical :
[viewA convertRect:viewX.frame toView:someSuperview];Wait for the user to perform dragging/moving.
After the touches end, add viewX to viewB and convert the frame again.