Contents

withScrollIndicatorsShown(forContentOffsetChanges:)

Displays the scroll indicators during updates to the scroll view’s content offset.

Declaration

func withScrollIndicatorsShown(forContentOffsetChanges changes: () -> Void)

Parameters

  • changes:

    A block that changes the scroll view’s content offset.

Discussion

The scroll view displays the scroll indicator for an axis if the content offset changes along that axis; otherwise, the scroll indicator for that axis remains hidden. For example, if you update the content offset horizontally in the changes block, the scroll view shows the horizontal scroll indicator but not the vertical scroll indicator.

If you animate changes to the content offset in the changes block, the scroll view displays its scroll indicators in their original locations, animates them to the destination locations, then fades them out. Otherwise, the scroll view displays its scroll indicators in the destination locations, then fades them out.

See Also

Managing the scroll indicator and refresh control