Contents

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

Creates a menu item for assigned document submission.

Declaration

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.