<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSViewController/representedObject",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSViewController(py)representedObject"
  },
  "title" : "representedObject"
}
-->

# representedObject

The object whose value is presented in the receiver’s primary view.

```
var representedObject: Any? { get set }
```

## Discussion

This property *retains* the object you provide to it; it does not *copy* it. In another words, a view controller has a *to-one* relationship with its represented object and does not own it as an attribute.

The [`representedObject`](/documentation/AppKit/NSViewController/representedObject) property is key-value coding and key-value observing compliant. When you use the represented object as the file’s owner of a nib file, you can bind controls to the file’s owner using key paths that start with the string `representedObject`.

---

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)