---
title: "setDefaultValue(_:forInputKey:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/qccompositionpickerview/setdefaultvalue(_:forinputkey:)"
---

# setDefaultValue(_:forInputKey:)

Sets the default value to use for a composition input parameter.

## Declaration

```swift
func setDefaultValue(_ value: Any!, forInputKey key: String!)
```

## Parameters

- `value`: This default value overrides any initial value existing for composition input parameters with this key. Pass nil to clear the default value.
- `key`: The input parameter key whose default value you want to set.

## See Also

### Setting Composition Input Parameters

- [resetDefaultInputValues()](quartz/qccompositionpickerview/resetdefaultinputvalues().md)
