---
title: "scopeBarButtonTitleTextAttributes(for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uisearchbar/scopebarbuttontitletextattributes(for:)"
---

# scopeBarButtonTitleTextAttributes(for:)

Returns the text attributes for the search bar’s button’s title string for a given state.

## Declaration

```swift
func scopeBarButtonTitleTextAttributes(for state: UIControl.State) -> [NSAttributedString.Key : Any]?
```

## Parameters

- `state`: A control state.

## Return Value

Return Value The text attributes for the search bar’ button’s title string for state. The attributes may specify the font, text color, text shadow color, and text shadow offset, using the keys found in NSString UIKit Additions Reference.

## See Also

### Customizing the scope bar appearance

- [scopeBarBackgroundImage](uikit/uisearchbar/scopebarbackgroundimage.md)
- [scopeBarButtonBackgroundImage(for:)](uikit/uisearchbar/scopebarbuttonbackgroundimage(for:).md)
- [setScopeBarButtonBackgroundImage(_:for:)](uikit/uisearchbar/setscopebarbuttonbackgroundimage(_:for:).md)
- [scopeBarButtonDividerImage(forLeftSegmentState:rightSegmentState:)](uikit/uisearchbar/scopebarbuttondividerimage(forleftsegmentstate:rightsegmentstate:).md)
- [setScopeBarButtonDividerImage(_:forLeftSegmentState:rightSegmentState:)](uikit/uisearchbar/setscopebarbuttondividerimage(_:forleftsegmentstate:rightsegmentstate:).md)
- [setScopeBarButtonTitleTextAttributes(_:for:)](uikit/uisearchbar/setscopebarbuttontitletextattributes(_:for:).md)
