mirror of
https://github.com/Finb/Bark.git
synced 2025-12-08 21:36:01 +00:00
调整滚动到顶部位置
This commit is contained in:
parent
bce1375ac1
commit
c082f173f0
@ -225,7 +225,9 @@ class MessageListViewController: BaseViewController<MessageListViewModel> {
|
||||
}
|
||||
|
||||
private func scrollToTop() {
|
||||
self.tableView.setContentOffset(CGPoint(x: 0, y: -250), animated: false)
|
||||
if self.tableView.visibleCells.count > 0 {
|
||||
self.tableView.scrollToRow(at: IndexPath(row: 0, section: 0), at: .top, animated: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user