---
title: "scrollViewWillBeginZooming(_:with:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiscrollviewdelegate/scrollviewwillbeginzooming(_:with:)"
---

# scrollViewWillBeginZooming(_:with:)

Tells the delegate that zooming of the content in the scroll view is about to commence.

## Declaration

```swift
optional func scrollViewWillBeginZooming(_ scrollView: UIScrollView, with view: UIView?)
```

## Parameters

- `scrollView`: The scroll-view object displaying the content view.
- `view`: The view object whose content is about to be zoomed.

## Discussion

Discussion This method is called at the beginning of zoom gestures and in cases where a change in zoom level is to be animated. You can use this method to store state information or perform any additional actions prior to zooming the view’s content.

## See Also

### Managing zooming

- [viewForZooming(in:)](uikit/uiscrollviewdelegate/viewforzooming(in:).md)
- [scrollViewDidEndZooming(_:with:atScale:)](uikit/uiscrollviewdelegate/scrollviewdidendzooming(_:with:atscale:).md)
- [scrollViewDidZoom(_:)](uikit/uiscrollviewdelegate/scrollviewdidzoom(_:).md)
