---
title: "setTitleShadowColor(_:for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uibutton/settitleshadowcolor(_:for:)"
---

# setTitleShadowColor(_:for:)

Sets the color of the title shadow to use for the specified state.

## Declaration

```swift
func setTitleShadowColor(_ color: UIColor?, for state: UIControl.State)
```

## Parameters

- `color`: The color of the title shadow to use for the specified state.
- `state`: The state that uses the specified color. The possible values are described in doc://com.apple.uikit/documentation/UIKit/UIControl/State-swift.struct.

## Discussion

Discussion In general, if a property is not specified for a state, the default is to use the normal value. If the normal value is not set, then the property defaults to a system value. Therefore, at a minimum, you should set the value for the normal state.

## See Also

### Managing the title

- [titleLabel](uikit/uibutton/titlelabel.md)
- [title(for:)](uikit/uibutton/title(for:).md)
- [setTitle(_:for:)](uikit/uibutton/settitle(_:for:).md)
- [attributedTitle(for:)](uikit/uibutton/attributedtitle(for:).md)
- [setAttributedTitle(_:for:)](uikit/uibutton/setattributedtitle(_:for:).md)
- [titleColor(for:)](uikit/uibutton/titlecolor(for:).md)
- [setTitleColor(_:for:)](uikit/uibutton/settitlecolor(_:for:).md)
- [titleShadowColor(for:)](uikit/uibutton/titleshadowcolor(for:).md)
