# `GSLayer.background`

*Instance Property*

Editable background content associated with the layer.

## Declaration

```swift
var background: GSLayer? { get set }
```

```objc
@property (nonatomic, strong) GSLayer * background;
```

[See also `background` in the Python API](https://docu.glyphsapp.com/#GSLayer.background)

```python
pyobjc_instanceMethods.background() -> GSLayer
pyobjc_instanceMethods.setBackground_(background: GSLayer)
```

## Discussion

Reading this property creates an empty background layer when needed. Use [`GSLayer hasBackground`](/Core/GlyphsCore/GSLayer/hasBackground) to check for an existing background without creating one. Set this property to `nil` to remove the stored background.

## See Also

### Background Layer

- [`GSBackgroundLayer`](/Core/GlyphsCore/GSBackgroundLayer) — Editable background content associated with a foreground layer.
- [`GSLayer hasBackground`](/Core/GlyphsCore/GSLayer/hasBackground) — Whether a background layer has been created.
- [`GSLayer contentToBackgroundCheckSelection:keepOldBackground:`](/Core/GlyphsCore/GSLayer/contentToBackgroundCheckSelection:keepOldBackground:) — Copies shapes and anchors to the corresponding foreground or background layer.
- [`GSLayer swapForegroundWithBackground`](/Core/GlyphsCore/GSLayer/swapForegroundWithBackground) — Exchanges shapes, anchors, and hints between the foreground and background layers.

