<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIView/drawHierarchy(in:afterScreenUpdates:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIView(im)drawViewHierarchyInRect:afterScreenUpdates:"
  },
  "title" : "drawHierarchy(in:afterScreenUpdates:)"
}
-->

# drawHierarchy(in:afterScreenUpdates:)

Renders a snapshot of the complete view hierarchy as visible onscreen into the current context.

```
func drawHierarchy(in rect: CGRect, afterScreenUpdates afterUpdates: Bool) -> Bool
```

## Parameters

`rect`

A rectangle specified in the local coordinate system (bounds) of the view.

`afterUpdates`

A Boolean value that indicates whether the snapshot should be rendered after recent changes have been incorporated. Specify the value <doc://com.apple.documentation/documentation/Swift/false> if you want to render a snapshot in the view hierarchy’s current state, which might not include recent changes.

## Return Value

Returns <doc://com.apple.documentation/documentation/Swift/true> if the snapshot is complete, or <doc://com.apple.documentation/documentation/Swift/false> if the snapshot is missing image data for any view in the hierarchy.

## Discussion

Use this method when you want to apply a graphical effect, such as a blur, to a view snapshot. This method is not as fast as the [`snapshotView(afterScreenUpdates:)`](/documentation/UIKit/UIView/snapshotView(afterScreenUpdates:)) method.

---

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)