3

该应用程序可以在这里看到:http: //pushpoppress.com/ourchoice/。我感兴趣的是他们可以自由捏合底部的缩略图以放大到全视图的部分。复制这种效果会很有趣。

有什么想法吗?

4

2 回答 2

2

要旋转图像:

导入数学.h

在 touchesbegan 中:查找 firsttouch、secondtouch 等。

然后:浮动开始方向= tanh((firsttouch.y-secondtouch.y)/(firsttouch.x-secondtouch.x));

在 touchesmoved 中:找到 firsttouch,再次找到 secondtouch,然后:

浮动新方向 = tanh((firsttouch.y-secondtouch.y)/(firsttouch.x-secondtouch.x));

image.transform = CGAffineTransformMakeRotation(newdirection-startdirection);

于 2011-07-04T16:51:39.080 回答
0

您可以使用 touchesBegan 但枚举触摸并使用点之间的距离、它们的位置等来操纵 UIImageView 的大小和位置。然后,如果距离足够大,它可以自动跳转到全屏。

于 2011-07-04T02:29:30.463 回答