---
title: UIBarButtonItem.AxisBehavior.horizontalOnly
framework: UIKit
role: symbol
role_heading: Case
platforms: [iOS 27.1+, iPadOS 27.1+]
path: uikit/uibarbuttonitem/axisbehavior-swift.enum/horizontalonly
---

# UIBarButtonItem.AxisBehavior.horizontalOnly

The item only supports horizontal bars. If an item only supports horizontal bars and no horizontal bars are present, the item is not shown.

## Declaration

```swift
case horizontalOnly
```

## See Also

### Choosing an orientation behavior

- [UIBarButtonItem.AxisBehavior.automatic](uikit/uibarbuttonitem/axisbehavior-swift.enum/automatic.md)
- [UIBarButtonItem.AxisBehavior.verticalPreferred](uikit/uibarbuttonitem/axisbehavior-swift.enum/verticalpreferred.md)
