iPhone如何在屏幕的某些部分获得放大效果?
大家好,
以上图片取自“Nike Boom”应用程序。我想知道如何对数字列表进行放大效果,如图所示。我还想指出,它是非常非常流畅的动画,因此屏幕捕获屏幕的某些部分并将其投影回 UIView 可能不起作用(我尝试过)
提前谢谢, 池塘
更新: 嘿,
对于任何可能遇到这个主题的人,我根据 Nielsbot 的建议制作了一个简单的示例,并将其发布在 github 这里
请随意分叉它,改进它并传递它:)
最好,
Pondd
Hi all,
The images above are taken from the "Nike Boom" App. I am wondering how to do a magnified effect on the number list as shown in the images. I also want to point out that it is very very smooth animation, so screen capturing certain part of a screen and projected it back on UIView may not work (I tried that)
Thankz in advance,
Pondd
Update:
Hey,
Just so for anyone who might comes across this topic, I've made a simple sample based on Nielsbot's suggestion and posted up on github here
Please feel free to fork it, improve it and pass it on :)
Best,
Pondd
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它是通过两个滚动视图完成的,一个在另一个前面。一个滚动视图 (A) 包含小数字。第二个滚动视图 (B) 包含缩放的数字。 (B)的框架是透明窗口。当您滚动 (A) 时,您会以编程方式滚动 (B),但将其移动得比 (A) 更远。 (即,如果 (A) 滚动 10 个像素,您可能会滚动 (B) 20 个像素。)
有道理吗?
如果您曾经使用过 TapTapTap 中的 Convert.app,它们会使用类似的效果。
It's done with 2 scroll views, one in front of the other. One scroll view (A) contains the small numbers. The second scroll view (B) contains the zoomed numbers. The frame of (B) is the transparent window. When you scroll (A), you scroll (B) programmatically, but you move it farther than (A). (I.e. if (A) scrolls 10 pixels, you might scroll (B) 20 pixels.)
Make sense?
If you've ever used Convert.app from TapTapTap they use a similar effect.