---
title: "shouldArchiveValue(forKey:)"
framework: quartzcore
role: symbol
role_heading: Instance Method
path: "quartzcore/caanimation/shouldarchivevalue(forkey:)"
---

# shouldArchiveValue(forKey:)

Specifies whether the value of the property for a given key is archived.

## Declaration

```swift
func shouldArchiveValue(forKey key: String) -> Bool
```

## Parameters

- `key`: The name of one of the receiver’s properties.

## Return Value

Return Value true if the specified property should be archived, otherwise false.

## Discussion

Discussion Called by the object’s implementation of encodeWithCoder:. The object must implement keyed archiving. The default implementation returns true.

## See Also

### Related Documentation

- [Core Animation Programming Guide](apple-archive/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction.md)
