Skip to content

Instantly share code, notes, and snippets.

@edudnyk
Created October 20, 2021 20:47
Show Gist options
  • Save edudnyk/ea4c711d16ec7de963e5f64347e7a34e to your computer and use it in GitHub Desktop.
Save edudnyk/ea4c711d16ec7de963e5f64347e7a34e to your computer and use it in GitHub Desktop.
The public interface of the hidden _ScrollViewProxy type in SwiftUI.
public struct _ScrollViewProxy : Equatable {
public var config: _ScrollViewConfig { get }
public var contentOffset: CGPoint { get set }
public var minContentOffset: CGPoint { get }
public var maxContentOffset: CGPoint { get }
public var contentSize: CGSize { get }
public var pageSize: CGSize { get }
public var visibleRect: CGRect { get }
public var isDragging: Bool { get }
public var isDecelerating: Bool { get }
public var isScrolling: Bool { get }
public var isScrollingHorizontally: Bool { get }
public var isScrollingVertically: Bool { get }
public func setContentOffset(_ newOffset: CGPoint, animated: Bool, completion: ((Bool) -> Void)? = nil)
public func scrollRectToVisible(_ rect: CGRect, animated: Bool, completion: ((Bool) -> Void)? = nil)
public func contentOffsetOfNextPage(_ directions: _EventDirections) -> CGPoint
public static func == (lhs: _ScrollViewProxy, rhs: _ScrollViewProxy) -> Bool
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment