---
title: nearestHorizontalEdge
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nscollectionview/scrollposition/nearesthorizontaledge
---

# nearestHorizontalEdge

Scroll so that the bounding box is adjacent to the nearest edge (top or bottom) of the collection view. This option must not be combined with the top, centeredVertically, or bottom options, but may be combined with other options.

## Declaration

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

## See Also

### Constants

- [top](appkit/nscollectionview/scrollposition/top.md)
- [centeredVertically](appkit/nscollectionview/scrollposition/centeredvertically.md)
- [bottom](appkit/nscollectionview/scrollposition/bottom.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)
