---
title: zPosition
framework: quartzcore
role: symbol
role_heading: Instance Property
path: quartzcore/calayer/zposition
---

# zPosition

The layer’s position on the z axis. Animatable.

## Declaration

```swift
var zPosition: CGFloat { get set }
```

## Discussion

Discussion The default value of this property is 0. Changing the value of this property changes the front-to-back ordering of layers onscreen. Higher values place this layer visually closer to the viewer than layers with lower values. This can affect the visibility of layers whose frame rectangles overlap. The value of this property is measured in points. The range of this property is single-precision, floating-point -greatestFiniteMagnitude to greatestFiniteMagnitude.

## See Also

### Modifying the layer geometry

- [frame](quartzcore/calayer/frame.md)
- [bounds](quartzcore/calayer/bounds.md)
- [position](quartzcore/calayer/position.md)
- [anchorPointZ](quartzcore/calayer/anchorpointz.md)
- [anchorPoint](quartzcore/calayer/anchorpoint.md)
- [contentsScale](quartzcore/calayer/contentsscale.md)
