---
title: "setContentWidth(_:type:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nstextblock/setcontentwidth(_:type:)"
---

# setContentWidth(_:type:)

## Declaration

```swift
func setContentWidth(_ contentWidth: CGFloat, type: NSTextBlock.ValueType)
```

## See Also

### Setting content dimensions

- [setValue(_:type:for:)](uikit/nstextblock/setvalue(_:type:for:).md)
- [value(for:)](uikit/nstextblock/value(for:).md)
- [valueType(for:)](uikit/nstextblock/valuetype(for:).md)
- [contentWidth](uikit/nstextblock/contentwidth.md)
- [contentWidthValueType](uikit/nstextblock/contentwidthvaluetype.md)
