点按两次并滑动/拖动手指即可放大/缩小 [英] Doubletap and slide/drag finger to zoom in/out

查看:99
本文介绍了点按两次并滑动/拖动手指即可放大/缩小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果有人遇到了iOS版google maps应用,则有一个很棒的功能可以用一根手指进行放大/缩小: 双击uiscrollview,然后立即向上或向下滑动手指以放大/缩小. 有谁知道这是如何实现的?谷歌有没有发布任何摘录?

If anyone came across the google maps app for iOS there is a great feature to zoom in/out with one finger: Doubletap on the uiscrollview and then immediately slide finger up or down to zoom in/out. Does anyone know how this is achieved? Did google post any snippet of that?

推荐答案

我将此功能添加到了我的UIScrollView类别.
实际的点击识别很容易,计算出正确"(无论感觉如何)zoomScale就是问题……如果您认为该类别的处理能力不够好,请随时告诉我并打开github页面上的新问题.

I added this functionality to my UIScrollView category.
The actual tap recognition is easy, calculating the "correct" (whatever feels "correct") zoomScale is the problem… If you think the category isn't handling this good enough, please don't hesitate to tell me and open a new issue on the github page.

这篇关于点按两次并滑动/拖动手指即可放大/缩小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆