Contents

setContentOffset(_:animated:)

Sets the point at which the origin of the content view is offset from the origin of the scroll view.

Declaration

func setContentOffset(_ contentOffset: CGPoint, animated: Bool)

Parameters

  • contentOffset:

    A point (expressed in points) that’s offset from the content view’s origin.

  • animated:

    True to animate the transition at a constant velocity to the new offset, False to make the transition immediate.

See Also

Managing the content size and offset