<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UINavigationItem/searchBarPlacement-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UINavigationItem(py)searchBarPlacement"
  },
  "title" : "searchBarPlacement"
}
-->

# searchBarPlacement

The placement of the search bar in the navigation bar.

```
var searchBarPlacement: UINavigationItem.SearchBarPlacement { get }
```

## Discussion

Use this property to determine the actual search bar placement when the [`preferredSearchBarPlacement`](/documentation/UIKit/UINavigationItem/preferredSearchBarPlacement) is [`UINavigationItem.SearchBarPlacement.automatic`](/documentation/UIKit/UINavigationItem/SearchBarPlacement-swift.enum/automatic).

This property only applies when the navigation item has a [`searchController`](/documentation/UIKit/UINavigationItem/searchController).

---

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)