SwiftstructSwiftUICore

struct SwiftUI.ScrollPosition

Structure

What a query’s scopes step through. Every node here can be matched — see the syntax.

inherits{}

Members 26

  1. fieldvar idType: Hashable.Type
  2. fieldvar seed: UInt
  3. fieldvar storage: SwiftUI.ScrollPosition.Storage+0x0
  4. funcmatches<A where A: Hashable>(id: A) -> Bool
  5. funcscrollTo(x: CoreGraphics.CGFloat, y: CoreGraphics.CGFloat) -> ()
  6. funcscrollTo(x: CoreGraphics.CGFloat) -> ()
  7. funcscrollTo(y: CoreGraphics.CGFloat) -> ()
  8. funcscrollTo<A where A: Hashable, A: Sendable>(id: A, anchor: SwiftUI.UnitPoint?) -> ()
  9. funcscrollTo(edge: SwiftUI.Edge) -> ()
  10. funcscrollTo(point: CGPoint) -> ()
  11. funcviewID<A where A: Hashable, A: Sendable>(type: A.Type) -> A?
  12. funcwantsUpdate(toPosition: SwiftUI.ScrollPosition) -> Bool
  13. initinit<A where A: Hashable, A: Sendable>(id: A, anchor: SwiftUI.UnitPoint?) -> SwiftUI.ScrollPosition
  14. initinit<A where A: Hashable, A: Sendable>(idType: A.Type, x: CoreGraphics.CGFloat, y: CoreGraphics.CGFloat) -> SwiftUI.ScrollPosition
  15. initinit<A where A: Hashable, A: Sendable>(idType: A.Type, x: CoreGraphics.CGFloat) -> SwiftUI.ScrollPosition
  16. initinit<A where A: Hashable, A: Sendable>(idType: A.Type, y: CoreGraphics.CGFloat) -> SwiftUI.ScrollPosition
  17. initinit<A where A: Hashable, A: Sendable>(idType: A.Type, edge: SwiftUI.Edge) -> SwiftUI.ScrollPosition
  18. initinit<A where A: Hashable, A: Sendable>(idType: A.Type, point: CGPoint) -> SwiftUI.ScrollPosition
  19. initinit<A where A: Hashable, A: Sendable>(idType: A.Type, storage: SwiftUI.ScrollPosition.Storage) -> SwiftUI.ScrollPosition
  20. initinit<A where A: Hashable, A: Sendable>(idType: A.Type) -> SwiftUI.ScrollPosition
  21. varvar edge: SwiftUI.Edge? { get }
  22. varvar isPositionedByUser: Bool { get set }
  23. varvar point: CGPoint? { get }
  24. varvar viewID: (Hashable & Sendable)? { get }
  25. varvar x: CoreGraphics.CGFloat? { get }
  26. varvar y: CoreGraphics.CGFloat? { get }
struct ScrollPosition {
    enum Storage {
        case viewID(SwiftUI.ScrollPosition.ViewID)
        case edge(SwiftUI.Edge)
        case point(__C.CGPoint)
        case x(CoreGraphics.CGFloat)
        case y(CoreGraphics.CGFloat)
        case automatic
        case positionedByUser
    }
    struct ViewID {
        var id: any Swift.Hashable
        var anchor: SwiftUI.UnitPoint?
    }
    var storage: SwiftUI.ScrollPosition.Storage
    var idType: any Swift.Hashable.Type
    var seed: Swift.UInt

    init<A>(id: A, anchor: SwiftUI.UnitPoint?) where A: Swift.Hashable, A: Swift.Sendable
    init<A>(idType: A.Type, x: CoreGraphics.CGFloat, y: CoreGraphics.CGFloat) where A: Swift.Hashable, A: Swift.Sendable
    init<A>(idType: A.Type, x: CoreGraphics.CGFloat) where A: Swift.Hashable, A: Swift.Sendable
    init<A>(idType: A.Type, y: CoreGraphics.CGFloat) where A: Swift.Hashable, A: Swift.Sendable
    init<A>(idType: A.Type, edge: SwiftUI.Edge) where A: Swift.Hashable, A: Swift.Sendable
    init<A>(idType: A.Type, point: __C.CGPoint) where A: Swift.Hashable, A: Swift.Sendable
    init<A>(idType: A.Type, storage: SwiftUI.ScrollPosition.Storage) where A: Swift.Hashable, A: Swift.Sendable
    init<A>(idType: A.Type) where A: Swift.Hashable, A: Swift.Sendable

    var edge: SwiftUI.Edge? {
        get
    }
    var isPositionedByUser: Swift.Bool {
        get
        set
    }
    var point: __C.CGPoint? {
        get
    }
    var viewID: (any Swift.Hashable & Swift.Sendable)? {
        get
    }
    var x: CoreGraphics.CGFloat? {
        get
    }
    var y: CoreGraphics.CGFloat? {
        get
    }

    func wantsUpdate(toPosition: SwiftUI.ScrollPosition) -> Swift.Bool
    func viewID<A>(type: A.Type) -> A? where A: Swift.Hashable, A: Swift.Sendable
    func matches<A>(id: A) -> Swift.Bool where A: Swift.Hashable
    func scrollTo(x: CoreGraphics.CGFloat, y: CoreGraphics.CGFloat)
    func scrollTo(x: CoreGraphics.CGFloat)
    func scrollTo(y: CoreGraphics.CGFloat)
    func scrollTo<A>(id: A, anchor: SwiftUI.UnitPoint?) where A: Swift.Hashable, A: Swift.Sendable
    func scrollTo(edge: SwiftUI.Edge)
    func scrollTo(point: __C.CGPoint)
}