Instance Method

unlockDocumentWithCompletionHandler:

Allows the user to make modifications to the document.

Declaration

- (void)unlockDocumentWithCompletionHandler:(void (^)(BOOL didUnlock))completionHandler;

Parameters

completionHandler

The completion handler block object passed in to be invoked after unlocking is completed, regardless of success or failure.

Discussion

By default, this method invokes the unlockWithCompletionHandler: method to unlock the document. This method disables autosaving safety checking, meaning that checkAutosavingSafetyAndReturnError: will no longer be invoked on this document. When unlocking succeeds, the locked method will begin returning NO.

See Also

Locking Documents

- lockDocument:

Locks the document in response to the user choosing the Lock menu item.

- unlockDocument:

Unlocks the document in response to the user choosing the Unlock menu item.

- lockDocumentWithCompletionHandler:

Prevents the user from making further changes to the document.

- lockWithCompletionHandler:

Prevents further modifications from being made to the file.

- unlockWithCompletionHandler:

Allows the user to make modifications to the file.

locked

A Boolean value indicating whether or not the file can be written to.