<!--
{
  "availability" : [
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DiskImageKit",
  "identifier" : "/documentation/DiskImageKit/DiskImage/LayerType-swift.struct/overlay(blockCount:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "DiskImageKit"
    ],
    "preciseIdentifier" : "s:12DiskImageKit0aB0C9LayerTypeV7overlay10blockCountAESi_tFZ"
  },
  "title" : "overlay(blockCount:)"
}
-->

# overlay(blockCount:)

An overlay layer with a specific block count.

```
static func overlay(blockCount: Int) -> DiskImage.LayerType
```

## Parameters

`blockCount`

The number of blocks for the overlay layer, which changes the effective size of the entire stack. `blockCount` must be greater than zero.

## Discussion

Overlay layers store all the changed blocks from the layers beneath it in the stack.
This variant resizes the stacked disk image since the size is determined by the top-most layer.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)