---
title: "init(containerView:style:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uihovereffectlayer/init(containerview:style:)"
---

# init(containerView:style:)

Creates a UIHoverEffectLayer with the provided containerView and style. If a nil style is provided, the automatic style will be used instead.

## Declaration

```swift
init(containerView: UIView, style: UIHoverStyle?)
```
