无限的 UIScrollView [英] Infinite UIScrollView

查看:17
本文介绍了无限的 UIScrollView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现一个时间线,就像您可以在 iMovie 或 Final Cut 中找到的时间线,您可以向任一方向滚动.向左滚动会回到过去(几个月),向右滚动会及时前进,创建一个平滑的继续路径.

I would like to implement a timeline, much like one you can find in iMovie or Final Cut, which you can scroll in either direction. Scrolling to the left would go back in time ( months ) and scrolling to the right would go forward in time, creating a smooth continues path.

实现此目的的最佳方法是什么?

What would be the best way to implement this?

  • 用 UIScrollView 做一些棘手的事情
  • 子类化 UIView 并尝试重新创建惯性滚动

重新创建惯性滚动的一个缺点是,如果 Apple 决定更改它,我的应用程序会感觉很奇怪.我个人不喜欢一个应用程序没有系统集成的感觉,这包括像 Tower madness 这样的游戏,他们制作了自己的滚动视图,效果非常糟糕并且感觉不对.

A disadvantage of recreating the inertial scrolling is if Apple ever decides to change it that my app will feel weird. I personally do not like it when an app does not feel system integrated, this includes games like tower madness where they made their own scrollview which works really bad and feels wrong.

推荐答案

Apple 有一个以无限滚动为特色的示例项目,它被称为 StreetScroller,描述说:

Apple has and example project featuring infinite scrolling it's called StreetScroller, the description says:

演示 UIScrollView 子类如何在水平方向.

Demonstrates how a UIScrollView subclass can scroll infinitely in the horizontal direction.

希望对你有帮助.

这篇关于无限的 UIScrollView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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