0

I have a simple iOS app (running on iPad) that has only an UIWebView filling the full screen.

Now I added a new UIWebView(a lot smaller that the previous one) and let it sit on top of the first one.

Is there a way for me to be able to drag and drop the second UIWebView around on the first one?

Thanks a lot

4

1 回答 1

1

您可以使用UIPanGestureRecognizer将拖动功能添加到任何视图。使用它,您将获得拖动的坐标(您可以使用它设置视图的框架),并在平移停止时获得一个标志(您的拖放)。

这是一个取自网络的示例:Working with UIGestureRecognizers

于 2012-09-25T18:53:37.403 回答