<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextField/borderStyle-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITextField(py)borderStyle"
  },
  "title" : "borderStyle"
}
-->

# borderStyle

The border style for the text field.

```
var borderStyle: UITextField.BorderStyle { get set }
```

## Discussion

The default value for this property is [`UITextField.BorderStyle.none`](/documentation/UIKit/UITextField/BorderStyle-swift.enum/none). If the value is set to the [`UITextField.BorderStyle.roundedRect`](/documentation/UIKit/UITextField/BorderStyle-swift.enum/roundedRect) style, the custom background image associated with the text field is ignored.

---

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)