<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CALayer/scroll(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Animation",
      "QuartzCore"
    ],
    "preciseIdentifier" : "c:objc(cs)CALayer(im)scrollPoint:"
  },
  "title" : "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.

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

## Parameters

`p`

The point in the current layer that should be scrolled into position.

## Discussion

If the layer is not contained by a [`CAScrollLayer`](/documentation/QuartzCore/CAScrollLayer) object, this method does nothing.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)