<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSFormCell/titleWidth(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFormCell(im)titleWidth:"
  },
  "title" : "titleWidth(_:)"
}
-->

# titleWidth(_:)

Returns the width of the title field constrained to the specified size.

```
func titleWidth(_ size: NSSize) -> CGFloat
```

## Parameters

`size`

The maximum size of the field when calculated by the Application Kit.

## Return Value

The width of the title field, measured in points in the user coordinate space.

## Discussion

If you set the width using [`titleWidth`](/documentation/AppKit/NSFormCell/titleWidth), this method returns the value you set; otherwise, the Application Kit calculates the width, constraining the field size to the specified value.

## See Also

[`titleWidth`](/documentation/AppKit/NSFormCell/titleWidth)

The width of the title field.



---

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)