---
title: "setWidth(_:type:for:rectEdge:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nstextblock/setwidth(_:type:for:rectedge:)"
---

# setWidth(_:type:for:rectEdge:)

## Declaration

```swift
func setWidth(_ width: CGFloat, type: NSTextBlock.ValueType, for layer: NSTextBlock.Layer, rectEdge: CGRectEdge)
```

## Mentioned in

Adding tables to attributed strings in UIKit

## See Also

### Setting layer widths

- [setWidth(_:type:for:)](uikit/nstextblock/setwidth(_:type:for:).md)
- [width(for:rectEdge:)](uikit/nstextblock/width(for:rectedge:).md)
- [widthValueType(for:rectEdge:)](uikit/nstextblock/widthvaluetype(for:rectedge:).md)
