<!--
{
  "availability" : [
    "iOS: 26.4.0 -",
    "iPadOS: 26.4.0 -",
    "macCatalyst: 26.4.0 -",
    "visionOS: 26.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ClassKitUI",
  "identifier" : "/documentation/ClassKitUI/AssignedDocumentDeferredMenuElement/init(documentURL:willSubmit:didSubmit:willWithdraw:didWithdraw:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "ClassKit UI"
    ],
    "preciseIdentifier" : "s:10ClassKitUI35AssignedDocumentDeferredMenuElementC11documentURL10willSubmit03didL00K8Withdraw0mN0AC10Foundation0J0V_SbAKYacyAKcSbAKYacyAKctcfc"
  },
  "title" : "init(documentURL:willSubmit:didSubmit:willWithdraw:didWithdraw:)"
}
-->

# init(documentURL:willSubmit:didSubmit:willWithdraw:didWithdraw:)

Creates a deferred menu element for assigned document submissions.

```
@MainActor @preconcurrency convenience init(documentURL: URL, willSubmit: @escaping @Sendable (URL) async -> Bool = { _ in true }, didSubmit: @escaping (URL) -> Void = { _ in }, willWithdraw: @escaping @Sendable (URL) async -> Bool = { _ in true }, didWithdraw: @escaping (URL) -> Void = { _ in })
```

## Parameters

`documentURL`

The URL of the assigned document.

`willSubmit`

A closure that executes before submission. Return `false` to prevent submission.

`didSubmit`

A closure that executes after successful submission.

`willWithdraw`

A closure that executes before withdrawing. Return `false` to prevent withdrawal.

`didWithdraw`

A closure that executes after successful withdrawal.

---

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)