<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIViewControllerContextTransitioning/initialFrame(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIViewControllerContextTransitioning(im)initialFrameForViewController:"
  },
  "title" : "initialFrame(for:)"
}
-->

# initialFrame(for:)

Returns the starting frame rectangle for the specified view controller’s view.

```
func initialFrame(for vc: UIViewController) -> CGRect
```

## Parameters

`vc`

The view controller whose frame rectangle you want.

## Return Value

The frame rectangle for the view or <doc://com.apple.documentation/documentation/CoreGraphics/CGRectZero> if the frame rectangle is not known or the view is not visible.

## Discussion

The rectangle returned by this method represents the size of the corresponding view at the beginning of the transition. For the view controller that is already onscreen, this rectangle typically matches the frame rectangle of the container view. For the view controller being presented, the value returned by this method is typically <doc://com.apple.documentation/documentation/CoreGraphics/CGRectZero> because the view is not yet on screen.

---

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)