---
title: "value(for:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextblock/value(for:)"
---

# value(for:)

Returns the value of the specified text block dimension.

## Declaration

```swift
func value(for dimension: NSTextBlock.Dimension) -> CGFloat
```

## Return Value

Return Value The value for the specified dimension. This value should be interpreted according to the value type returned by valueType(for:).

## See Also

### Working with dimensions of content

- [setValue(_:type:for:)](appkit/nstextblock/setvalue(_:type:for:).md)
- [valueType(for:)](appkit/nstextblock/valuetype(for:).md)
- [setContentWidth(_:type:)](appkit/nstextblock/setcontentwidth(_:type:).md)
- [contentWidth](appkit/nstextblock/contentwidth.md)
- [contentWidthValueType](appkit/nstextblock/contentwidthvaluetype.md)
- [NSTextBlock.Dimension](appkit/nstextblock/dimension.md)
- [NSTextBlock.ValueType](appkit/nstextblock/valuetype.md)
