---
title: "setForegroundLayer(_:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/ikimagebrowserview/setforegroundlayer(_:)"
---

# setForegroundLayer(_:)

The Core Animation layer used as the foreground overlay.

## Declaration

```swift
func setForegroundLayer(_ aLayer: CALayer!)
```

## Parameters

- `aLayer`: A CALayer instance.

## Discussion

Discussion The foreground overlay layer can have sublayers. Additionally, the layers can also contain animations. The foreground layer is an overlay that is applied to the view. It can be used to provide information such as loading progress or for pure cosmetic purposes, such as dark gradients on top and bottom of the browser view. This layer is optional.

## See Also

### Core Animation Layer Integration

- [foregroundLayer()](quartz/ikimagebrowserview/foregroundlayer().md)
- [setBackgroundLayer(_:)](quartz/ikimagebrowserview/setbackgroundlayer(_:).md)
- [backgroundLayer()](quartz/ikimagebrowserview/backgroundlayer().md)
