DetachedUndoRecorder
Swift
@objc(PSPDFDetachedUndoRecorder)
public protocol DetachedUndoRecorder : PendingUndoRecorder, UndoRecorder
A type of recorder that can be taken out of the scope managed by an undo controller to record undoable actions over time until manually committed.
PSPDF_EXPORT(PSPDFDetachedUndoRecorder)
-
Begin recording actions of changing multiple properties of the given annotations by observing changes made to them during the lifetime of the returned recorder.
Note
The returned recorder retains strong references to the given annotations until it’s committed.
Precondition
Recording new actions in an already committed recorder is not allowed and will result in an assertion failure.
Precondition
Each of the given annotations must already be referenced in a PDF document, otherwise they will be ignored.
Declaration
Swift
@objc(beginRecordingChangingAnnotations:) func beginRecording(changing annotations: [Annotation]) -> PendingUndoRecorder
Parameters
annotations
Annotations expected to change.
Return Value
Object that records changes to the given annotations upon committing. This object is not owned by the callee and must be retained by the caller.