<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BrowserEngineKit",
  "identifier" : "/documentation/BrowserEngineKit/LayerHierarchy",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "BrowserEngineKit"
    ],
    "preciseIdentifier" : "c:objc(cs)BELayerHierarchy"
  },
  "title" : "LayerHierarchy"
}
-->

# LayerHierarchy

An object that holds a reference to layers rendered in another process’s view.

```
@MainActor class LayerHierarchy
```

## Overview

This class holds another process’s view to synchronize UI updates across multiple processes in your browser app.

To use this class, create an instance in your browser app’s rendering extension and set its [`layer`](/documentation/BrowserEngineKit/LayerHierarchy/layer) to a <doc://com.apple.documentation/documentation/QuartzCore/CALayer> that renders content. You render the content in your rendering extension then access it in the browser app’s process for display.

Access the layer hierarchy’s [`handle`](/documentation/BrowserEngineKit/LayerHierarchy/handle), send it to the browser app, and add the handle to a [`LayerHierarchyHostingView`](/documentation/BrowserEngineKit/LayerHierarchyHostingView). Then, use the [`LayerHierarchyHostingTransactionCoordinator`](/documentation/BrowserEngineKit/LayerHierarchyHostingTransactionCoordinator) class to synchronize updates in the view and the layer.

For more information, see [Hosting browser view layers in the rendering extension](/documentation/BrowserEngineKit/hosting-browser-view-layers-in-the-rendering-extension).

## Topics

### Creating and invalidating a layer hierarchy

[`init() throws`](/documentation/BrowserEngineKit/LayerHierarchy/init())

Initializes a layer hierarchy.

[`func invalidate()`](/documentation/BrowserEngineKit/LayerHierarchy/invalidate())

Invalidates a layer hierarchy.

### Setting the layer

[`var layer: CALayer?`](/documentation/BrowserEngineKit/LayerHierarchy/layer)

The layer represented by this layer hierarchy.

### Getting a handle

[`var handle: LayerHierarchyHandle`](/documentation/BrowserEngineKit/LayerHierarchy/handle)

A reference to the layer hierarchy that you add to the hosting view.

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Sendable`](/documentation/Swift/Sendable)

---

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)