문제

I've search for some clues on this problem without much success. Hope someone can kick me in the right direction.

I am prototyping a couple of apps where I need to design my own GUI. The GUI is made up by two separated UIViews where one of them contains a small thumb of an image. I want to be able to drag this thumb from the first view to the other. Simple as that! But I haven't figured out how this is done. Here is the exact flow I am looking for:

  • touch the thumb
  • animate a small enlargement of the thumb
  • drag the thumb to the other UIView
  • drop the thumb
  • animate a shrink of the thumb

Not particularly strange, but the thumb remains related to the first view all the time. I've tried to move the thumb via the first views superview and then back to the second view, but with no luck.

도움이 되었습니까?

해결책

If the question is "How to move a UIView from one superview to another?", the answer is:

[myNewSuperview addSubview:myThumbView];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top