单击时缩放热点
我必须在图像上制作一些热点,这样当我单击其中任何一个时,它们就会缩放。
例如考虑图像
当我单击那只蝴蝶时,它会缩放
请提供一个好的解决方案
以下是我的想法
- 使用按钮并单击它并添加一个 subImageView 并缩放它。
- 触摸该位置时缩放该图像的特定区域。
这两种想法都有其局限性。首先,我必须创建一个单独的图像,而且我的应用程序大小将变得非常大。 第二个限制是它不会精确缩放所需的图像。
我也在考虑屏蔽,但我认为这也不是很好的方法,因为这只是一个示例,我有很多这样的图像,并且单个图像上可能有很多热点。
请指导。
I have to make some hot spots on my image , so that when i click anyone of them they zoom.
For example consider the image
When i click that butterfly then it zoom
Please provide a good solution
Following are my thinking
- Use a button and click it and add a subImageView and zoom it.
- Zoom a particular region of this image when touch at that place.
Both ideas have their limitations.In first i have to create a saperate image and also my app size will become very large.
and limitation of second is that it will not zoom exact required image.
I was also thinking of masking but i think that is also not very good way, because this is just a sample, i have many images like this and can be many hot spots on a single image.
please guide.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您正在处理相当大的图像,您应该查看 CATiledLayer,它使用起来非常快速且高效。
查看此博客文章,包括演示应用程序:
http://www.cimgf.com/2011/03/01/subduing-猫腻层/
If you are dealing we rather large images you should check out CATiledLayer, which are very fast and efficient to use.
Check out this blog post, including the demo app:
http://www.cimgf.com/2011/03/01/subduing-catiledlayer/