Instance Method

scrollRectToVisible(_:)

Initiates a scroll in the layer’s closest ancestor scroll layer so that the specified rectangle becomes visible.

Declaration

func scrollRectToVisible(_ r: CGRect)

Parameters

theRect

The rectangle to be made visible.

Discussion

If the layer is not contained by a CAScrollLayer object, this method does nothing.

See Also

Scrolling

var visibleRect: CGRect

The visible region of the layer in its own coordinate space.

func scroll(CGPoint)

Initiates a scroll in the layer’s closest ancestor scroll layer so that the specified point lies at the origin of the scroll layer.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software