<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIViewControllerTransition/zoomWithOptions:sourceViewProvider:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIViewControllerTransition(cm)zoomWithOptions:sourceViewProvider:"
  },
  "title" : "zoomWithOptions:sourceViewProvider:"
}
-->

# zoomWithOptions:sourceViewProvider:

Creates a zoom transition from the view specified by the source provider.

```
+ (instancetype) zoomWithOptions:(UIZoomTransitionOptions *) options sourceViewProvider:(UIView * (^)(UIZoomTransitionSourceViewProviderContext *)) sourceViewProvider;
```

## Parameters

`options`

Additional options for the zoom transition.

`sourceViewProvider`

A closure that returns the view, for example a thumbnail image, that the animation zooms out from and zooms back in to.

## Discussion

The system calls the source view provider when it presents and when it dismisses the view controller. In the closure, return the [`UIView`](/documentation/UIKit/UIView) that the animation should zoom in from or zoom back out to, respectively. For more information, see [Enhancing your app with fluid transitions](/documentation/UIKit/enhancing-your-app-with-fluid-transitions).

---

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)