0

I added 4 views in a window and I'm able to move those views by using touchesMoved method. My question is if I drag view1 on view2, the positions of view1 and view2 will be swapped. Similarly if i drag view1 on view3 or view4 the positions of those two views have to be swapped.

How can I achieve this?

Thanks in advance and sorry for bad language !!!

4

1 に答える 1

1

私は答えを見つけました。ご関心をお寄せいただきありがとうございます!!!

if条件を使用して、どのビューが移動しているかを確認してから、タッチポイントが他のビューの中心点と重なっていることを再度確認しました。yesが返された場合は、両方のビューの色を入れ替えました。

于 2012-08-12T06:45:51.353 に答える