gpt4 book ai didi

从底部快速启动 tableView(反向 tableView)

转载 作者:可可西里 更新时间:2023-11-01 00:38:10 27 4
gpt4 key购买 nike

是否可以对 tableView 进行反向排序?我搜索了很多解决方案,但没有任何效果。

效果就像whatsapp聊天。

一个普通的tableView是:

----------
label 1
----------
label 2
----------
label 3
----------
empty
----------
empty
----------

scroll direction
|
|
v

期望的结果:

----------
empty
----------
empty
----------
empty
----------
empty
----------
label 3
----------
label 2
----------
label 1
----------

scroll direction
^
|
|

感谢帮助

最佳答案

只需滚动到末尾并在插入单元格时执行相同的操作。

tableView.scrollToRowAtIndexPath(bottomIndexPath, atScrollPosition: .Bottom,
animated: true)

关于从底部快速启动 tableView(反向 tableView),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26148367/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com