One Logo Pool Ball
Charts · IOS API REFERENCE

ChartScrollTargetBehavior

protocol · iOS 17.0+ · SDK 27.1

protocol ChartScrollTargetBehavior : ScrollTargetBehavior

A type that configures the scroll behavior of charts.

Members (1)

method · iOS 17.0+

updateTarget

Swift declaration
func updateTarget(_ target: inout ScrollTarget, context: ScrollTargetBehaviorContext)

Updates the proposed target that a scrollable view should scroll to. The system calls this method in two main cases: - When a scroll gesture ends, it calculates where it would naturally scroll to using its deceleration rate. The system provides this calculated value as the target of this method. - When a scrollable view's size changes, it calculates where it should be scrolled given the new size and provides this calculates value as the target of this method. You can implement this method to override the calculated target which will have the scrollable view scroll to a different position than it would otherwise.

Omit the output parameters from the call. The result contains $ret and $out, with target inside $out.

Skipped declarations

6 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

ChartScrollTargetBehavior.valueAligned(unit:majorAlignment:limitBehavior:)

Static protocol requirements cannot be called through an instance.

ChartScrollTargetBehavior.valueAligned(matching:majorAlignment:limitBehavior:)

Static protocol requirements cannot be called through an instance.

ChartScrollTargetBehavior.valueAligned(xUnit:yUnit:xMajorAlignment:yMajorAlignment:limitBehavior:)

Static protocol requirements cannot be called through an instance.

ChartScrollTargetBehavior.valueAligned(xMatching:yMatching:xMajorAlignment:yMajorAlignment:limitBehavior:)

Static protocol requirements cannot be called through an instance.

ChartScrollTargetBehavior.valueAligned(xMatching:yUnit:xMajorAlignment:yMajorAlignment:limitBehavior:)

Static protocol requirements cannot be called through an instance.

ChartScrollTargetBehavior.valueAligned(xUnit:yMatching:xMajorAlignment:yMajorAlignment:limitBehavior:)

Static protocol requirements cannot be called through an instance.

All Charts types →