---
title: prepareContent()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nsobjectcontroller/preparecontent()
---

# prepareContent()

Typically overridden by subclasses that require additional control over the creation of new objects.

## Declaration

```swift
func prepareContent()
```

## Discussion

Discussion Subclasses that implement this method are responsible for creating the new content object and setting it as the receiver’s content object. This method is only called if automaticallyPreparesContent has been set to true.

## See Also

### Managing content

- [content](appkit/nsobjectcontroller/content.md)
- [automaticallyPreparesContent](appkit/nsobjectcontroller/automaticallypreparescontent.md)
