---
title: "init(idType:point:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/scrollposition/init(idtype:point:)"
---

# init(idType:point:)

Creates a new scroll position to be scrolled to the provided point.

## Declaration

```swift
init(idType: (some Hashable & Sendable).Type = Never.self, point: CGPoint)
```

## Discussion

Discussion You can provide a type to the scroll position. This type should match the type of IDs associated to views in a scroll target layout. The scroll view will look for those views to update the value of the scroll position with.
