# `GSLayer hasBackground`

*Instance Method*

Whether a background layer has been created.

## Declaration

```swift
func hasBackground() -> Bool
```

```objc
- (BOOL) hasBackground;
```

```python
hasBackground() -> bool
```

## Discussion

This does not indicate whether the background contains any content.

## See Also

### Background Layer

- [`GSBackgroundLayer`](/Core/GlyphsCore/GSBackgroundLayer) — Editable background content associated with a foreground layer.
- [`GSLayer.background`](/Core/GlyphsCore/GSLayer/background) — Editable background content associated with the layer.
- [`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.

