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
falseto prevent submission. - didSubmit:
A closure that executes after successful submission.
- willWithdraw:
A closure that executes before withdrawing. Return
falseto prevent withdrawal. - didWithdraw:
A closure that executes after successful withdrawal.