带有“图层”的 UIScrollView

发布于 2025-01-08 05:27:12 字数 237 浏览 3 评论 0原文

对不起这个标题,但我不知道该怎么表达我想要的。

我想要一个带有图层的 UIScrollView,例如图像和其上方的文本,并且当滚动时,文本的移动速度比图像快。就像这个视频一样,正好在0:13;我曾考虑过在 UIScrollView 中使用 UIScrollView,但这并不是真正的好东西。

感谢您的关注, 阿尔贝托

Sorry about the title, but I don't know how to say what I want.

I want a UIScrollView with layers, like a image and a text above it, and when it is scrolled, the text is moved faster than the image. Like this video, exactly at 0:13; I've thought about a UIScrollView inside a UIScrollView, but would not be something really good.

Thanks for the attention,
Alberto

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

下壹個目標 2025-01-15 05:27:12

您可以在 UIScrollView 后面放置一个 UIImageView 实例。当方法 scrollViewDidScroll被调用,可以轻松改变位置背景视图的大小取决于滚动视图的偏移量。

You could place an instance of UIImageView behind your UIScrollView. When the method scrollViewDidScroll is called, you can easily change the position of your background view dependent on the offset of the scrollView.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文