<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISearchBar/scopeBarButtonDividerImage(forLeftSegmentState:rightSegmentState:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISearchBar(im)scopeBarButtonDividerImageForLeftSegmentState:rightSegmentState:"
  },
  "title" : "scopeBarButtonDividerImage(forLeftSegmentState:rightSegmentState:)"
}
-->

# scopeBarButtonDividerImage(forLeftSegmentState:rightSegmentState:)

Returns the divider image to use for a given combination of left and right segment states.

```
func scopeBarButtonDividerImage(forLeftSegmentState leftState: UIControl.State, rightSegmentState rightState: UIControl.State) -> UIImage?
```

## Parameters

`leftState`

The state of the left segment for which to provide the divider image.

    The state may be [`normal`](/documentation/UIKit/UIControl/State-swift.struct/normal)     or [`selected`](/documentation/UIKit/UIControl/State-swift.struct/selected)    .

`rightState`

The state of the right segment for which to provide the divider image.

    The state may be [`normal`](/documentation/UIKit/UIControl/State-swift.struct/normal)     or [`selected`](/documentation/UIKit/UIControl/State-swift.struct/selected)    .

## Return Value

The divider image to use for the combination of `leftState` and `rightState`.

## Discussion

For more details, see [`setScopeBarButtonDividerImage(_:forLeftSegmentState:rightSegmentState:)`](/documentation/UIKit/UISearchBar/setScopeBarButtonDividerImage(_:forLeftSegmentState:rightSegmentState:))

---

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)