<!--
{
  "availability" : [
    "Xcode: 16.3.0 -",
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "XCUIAutomation",
  "identifier" : "/documentation/XCUIAutomation/XCUICoordinate/scroll(byDeltaX:deltaY:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "XCUIAutomation"
    ],
    "preciseIdentifier" : "c:objc(cs)XCUICoordinate(im)scrollByDeltaX:deltaY:"
  },
  "title" : "scroll(byDeltaX:deltaY:)"
}
-->

# scroll(byDeltaX:deltaY:)

Scrolls the view by the number of x and y pixels you specify.

```
func scroll(byDeltaX deltaX: CGFloat, deltaY: CGFloat)
```

---

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)