---
title: centeredVertically
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nscollectionview/scrollposition/centeredvertically
---

# centeredVertically

Scroll so that the bounding box of the selected items is centered vertically in the collection view’s bounds. This option must not be combined with the top, bottom, or nearestHorizontalEdge options, but may be combined with other options.

## Declaration

```swift
static var centeredVertically: NSCollectionView.ScrollPosition { get }
```

## See Also

### Constants

- [top](appkit/nscollectionview/scrollposition/top.md)
- [bottom](appkit/nscollectionview/scrollposition/bottom.md)
- [nearestHorizontalEdge](appkit/nscollectionview/scrollposition/nearesthorizontaledge.md)
- [left](appkit/nscollectionview/scrollposition/left.md)
- [centeredHorizontally](appkit/nscollectionview/scrollposition/centeredhorizontally.md)
- [right](appkit/nscollectionview/scrollposition/right.md)
- [leadingEdge](appkit/nscollectionview/scrollposition/leadingedge.md)
- [trailingEdge](appkit/nscollectionview/scrollposition/trailingedge.md)
- [nearestVerticalEdge](appkit/nscollectionview/scrollposition/nearestverticaledge.md)
