<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIOffset/init(horizontal:vertical:)-9wl8x",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:So8UIOffsetV10horizontal8verticalAB14CoreFoundation7CGFloatV_AGtcfc"
  },
  "title" : "init(horizontal:vertical:)"
}
-->

# init(horizontal:vertical:)

Creates an offset structure from the given components.

```
init(horizontal: CGFloat, vertical: CGFloat)
```

## Parameters

`horizontal`

The horizontal offset.

`vertical`

The vertical offset.

---

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)