---
title: "scroll(_:)"
framework: quartzcore
role: symbol
role_heading: Instance Method
path: "quartzcore/calayer/scroll(_:)"
---

# scroll(_:)

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

## Declaration

```swift
func scroll(_ p: CGPoint)
```

## Parameters

- `p`: The point in the current layer that should be scrolled into position.

## Discussion

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

## See Also

### Scrolling

- [visibleRect](quartzcore/calayer/visiblerect.md)
- [scrollRectToVisible(_:)](quartzcore/calayer/scrollrecttovisible(_:).md)
