---
title: "presentedItemDidLose(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsfilepresenter/presenteditemdidlose(_:)"
---

# presentedItemDidLose(_:)

Tells the delegate that a version of the file or file package was removed.

## Declaration

```swift
optional func presentedItemDidLose(_ version: NSFileVersion)
```

## Parameters

- `version`: The file version object containing information about the version that was removed.

## Discussion

Discussion Your delegate can use this method to determine how to handle the loss of the specified file version. You can try to revert the presented document to a previous version or you might want to prompt the user about how to proceed.

## See Also

### Responding to Version Changes

- [presentedItemDidGain(_:)](foundation/nsfilepresenter/presenteditemdidgain(_:).md)
- [presentedItemDidResolveConflict(_:)](foundation/nsfilepresenter/presenteditemdidresolveconflict(_:).md)
- [presentedSubitem(at:didGain:)](foundation/nsfilepresenter/presentedsubitem(at:didgain:).md)
- [presentedSubitem(at:didLose:)](foundation/nsfilepresenter/presentedsubitem(at:didlose:).md)
- [presentedSubitem(at:didResolve:)](foundation/nsfilepresenter/presentedsubitem(at:didresolve:).md)
