---
title: setStroke()
framework: uikit
role: symbol
role_heading: Instance Method
path: uikit/uicolor/setstroke()
---

# setStroke()

Sets the color of subsequent stroke operations to the color that the receiver represents.

## Declaration

```swift
func setStroke()
```

## Discussion

Discussion If you subclass UIColor, you must implement this method in your subclass. Your custom implementation should modify the stroke color in the current graphics context by setting it to the color represented by the receiver.

## See Also

### Applying the color to the drawing environment

- [Customizing drawings](uikit/customizing-drawings.md)
- [set()](uikit/uicolor/set().md)
- [setFill()](uikit/uicolor/setfill().md)
