---
title: Contents Gravity Values
framework: quartzcore
role: collectionGroup
role_heading: API Collection
path: quartzcore/contents-gravity-values
---

# Contents Gravity Values

The contents gravity constants specify the position of the content object when the layer bounds is larger than the bounds of the content object. They are used by the contentsGravity property.

## Topics

### Constants

- [center](quartzcore/calayercontentsgravity/center.md)
- [top](quartzcore/calayercontentsgravity/top.md)
- [bottom](quartzcore/calayercontentsgravity/bottom.md)
- [left](quartzcore/calayercontentsgravity/left.md)
- [right](quartzcore/calayercontentsgravity/right.md)
- [topLeft](quartzcore/calayercontentsgravity/topleft.md)
- [topRight](quartzcore/calayercontentsgravity/topright.md)
- [bottomLeft](quartzcore/calayercontentsgravity/bottomleft.md)
- [bottomRight](quartzcore/calayercontentsgravity/bottomright.md)
- [resize](quartzcore/calayercontentsgravity/resize.md)
- [resizeAspect](quartzcore/calayercontentsgravity/resizeaspect.md)
- [resizeAspectFill](quartzcore/calayercontentsgravity/resizeaspectfill.md)

## See Also

### Modifying the layer’s appearance

- [contentsGravity](quartzcore/calayer/contentsgravity.md)
- [opacity](quartzcore/calayer/opacity.md)
- [isHidden](quartzcore/calayer/ishidden.md)
- [masksToBounds](quartzcore/calayer/maskstobounds.md)
- [mask](quartzcore/calayer/mask.md)
- [isDoubleSided](quartzcore/calayer/isdoublesided.md)
- [cornerRadius](quartzcore/calayer/cornerradius.md)
- [maskedCorners](quartzcore/calayer/maskedcorners.md)
- [CACornerMask](quartzcore/cacornermask.md)
- [borderWidth](quartzcore/calayer/borderwidth.md)
- [borderColor](quartzcore/calayer/bordercolor.md)
- [backgroundColor](quartzcore/calayer/backgroundcolor.md)
- [shadowOpacity](quartzcore/calayer/shadowopacity.md)
- [shadowRadius](quartzcore/calayer/shadowradius.md)
- [shadowOffset](quartzcore/calayer/shadowoffset.md)
