<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/ProgressManager/assign(count:to:)-98a77",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation15ProgressManagerC6assign5count2toySi_AA0B8ReporterCtF"
  },
  "title" : "assign(count:to:)"
}
-->

# assign(count:to:)

Adds a `ProgressReporter` as a child, with its progress representing a portion of `self`’s progress.

```
final func assign(count: Int, to reporter: ProgressReporter)
```

## Parameters

`count`

Units, which is a portion of `totalCount`delegated to an instance of `Subprogress`.

`reporter`

A `ProgressReporter` instance.

## Discussion

If a cycle is detected, this will cause a crash at runtime.

---

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)