如何像 Google Calendar 那样将单元格的内容滚动到 tableview 中的另一个单元格? [英] How to Scroll content of cell into another cell in tableview like Google Calendar did?

查看:61
本文介绍了如何像 Google Calendar 那样将单元格的内容滚动到 tableview 中的另一个单元格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望用户界面像 Google 日历一样进入 tableview.它在不同的行中显示相同的日期事件,但是当您向上或向下滚动时,左侧的日期也会向下滚动.

I wants user interface into tableview like Google calendar did. It is showing same dates events in different rows but when you scroll up or down, the date in left side gets scroll up down too.

你能帮我实现这个吗?请看截图.

Can you please help me how to achieve this. Please take a look on screenshot.

我认为这可以通过使用 tableview 来实现.如果我错了,那么很高兴按照您的建议进行操作.

As i am thinking this can be achieve by using tableview. If i am wrong then happy to follow your suggetion.

推荐答案

我个人认为可以使用 tableView 来实现.

I personal think it can be achieved using tableView.

一种方法是计算表格视图的滚动视图的偏移量并将其传递给单元格,以便它更新日期视图的顶部约束.

One way to do it is to calculate the scrollView's offset of the table view and pass it to the cell so that it update the top constraint for the date view.

另一种方法是按照这个想法设置约束.我没有尝试,但我认为它也可以工作.

Another way is to set up the constraint follow this idea. I didn't try but I think it could work as well.

这篇关于如何像 Google Calendar 那样将单元格的内容滚动到 tableview 中的另一个单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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