---
title: background
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uitextfield/background
---

# background

The image that represents the background appearance of the text field when it is in an enabled state.

## Declaration

```swift
var background: UIImage? { get set }
```

## Discussion

Discussion When set, the image referred to by this property replaces the standard appearance controlled by the borderStyle property. Background images are drawn in the border rectangle portion of the text field. Images you use for the text field’s background should be able to stretch to fit. This property is set to nil by default.

## See Also

### Setting the view’s background appearance

- [borderStyle](uikit/uitextfield/borderstyle-swift.property.md)
- [disabledBackground](uikit/uitextfield/disabledbackground.md)
