---
title: "init(horizontal:vertical:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uioffset/init(horizontal:vertical:)-9wl8x"
---

# init(horizontal:vertical:)

Creates an offset structure from the given components.

## Declaration

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

## Parameters

- `horizontal`: The horizontal offset.
- `vertical`: The vertical offset.

## See Also

### Initializing offsets

- [init()](uikit/uioffset/init().md)
