---
title: LayerHierarchy
framework: browserenginekit
role: symbol
role_heading: Class
path: browserenginekit/layerhierarchy
---

# LayerHierarchy

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

## Declaration

```swift
@MainActor class LayerHierarchy
```

## Mentioned in

Hosting browser view layers in the rendering extension Propagating view visibility information to extension processes

## Overview

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 to a 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, send it to the browser app, and add the handle to a LayerHierarchyHostingView. Then, use the LayerHierarchyHostingTransactionCoordinator class to synchronize updates in the view and the layer. For more information, see Hosting browser view layers in the rendering extension.

## Topics

### Creating and invalidating a layer hierarchy

- [init()](browserenginekit/layerhierarchy/init().md)
- [invalidate()](browserenginekit/layerhierarchy/invalidate().md)

### Setting the layer

- [layer](browserenginekit/layerhierarchy/layer.md)

### Getting a handle

- [handle](browserenginekit/layerhierarchy/handle.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)

## See Also

### Layer hosting

- [Hosting browser view layers in the rendering extension](browserenginekit/hosting-browser-view-layers-in-the-rendering-extension.md)
- [LayerHierarchyHostingView](browserenginekit/layerhierarchyhostingview.md)
- [LayerHierarchyHostingTransactionCoordinator](browserenginekit/layerhierarchyhostingtransactioncoordinator.md)
- [LayerHierarchyHandle](browserenginekit/layerhierarchyhandle.md)
