<!--
{
  "availability" : [
    "iOS: 27.1.0 -",
    "iPadOS: 27.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIBarButtonItem/AxisBehavior-swift.enum",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@UIBarButtonItemAxisBehavior"
  },
  "title" : "UIBarButtonItem.AxisBehavior"
}
-->

# UIBarButtonItem.AxisBehavior

```
enum AxisBehavior
```

## Topics

### Choosing an orientation behavior

[`case automatic`](/documentation/UIKit/UIBarButtonItem/AxisBehavior-swift.enum/automatic)

The automatic behavior. The system infers the
supported axes based on the contents of the item.

[`case horizontalOnly`](/documentation/UIKit/UIBarButtonItem/AxisBehavior-swift.enum/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.

[`case verticalPreferred`](/documentation/UIKit/UIBarButtonItem/AxisBehavior-swift.enum/verticalPreferred)

The item supports both horizontal and vertical bars,
and prefers a vertical placement when both horizontal
and vertical bars are present

### Initializers

[`init?(rawValue: Int)`](/documentation/UIKit/UIBarButtonItem/AxisBehavior-swift.enum/init(rawValue:))

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)