---
title: "init(payload:isCompact:layerCount:dataCodewordCount:)"
framework: coreimage
role: symbol
role_heading: Initializer
path: "coreimage/ciazteccodedescriptor/init(payload:iscompact:layercount:datacodewordcount:)"
---

# init(payload:isCompact:layerCount:dataCodewordCount:)

Initializes an Aztec code descriptor for the given payload and parameters.

## Declaration

```swift
init?(payload errorCorrectedPayload: Data, isCompact: Bool, layerCount: Int, dataCodewordCount: Int)
```

## Parameters

- `errorCorrectedPayload`: The data to encode in the Aztec code symbol.
- `isCompact`: A Boolean indicating whether or not the Aztec code is compact.
- `layerCount`: The number of layers in the Aztec code, from 1 to 32.
- `dataCodewordCount`: The number of codewords in the Aztec code, from 1 to 2048.

## Return Value

Return Value  An initialized CIAztecCodeDescriptor instance or nil if the parameters are invalid
