Various improvements

This commit is contained in:
Ilya Laktyushin
2023-03-22 01:07:24 +04:00
parent 9844fd0eb4
commit 32ff62bcb5
17 changed files with 422 additions and 121 deletions

View File

@@ -1350,6 +1350,12 @@ public final class SparseItemGrid: ASDisplayNode {
self.currentViewport?.scrollView.isScrollEnabled = self.isScrollEnabled
}
}
public func scrollWithDelta(_ delta: CGFloat) {
if let scrollView = self.currentViewport?.scrollView {
scrollView.setContentOffset(CGPoint(x: 0.0, y: scrollView.contentOffset.y + delta), animated: false)
}
}
public init(theme: PresentationTheme, initialZoomLevel: ZoomLevel? = nil) {
self.theme = theme