On this page
Guides
End Content Editing and Save
After completing edits, you can exit editing mode by using endOfEditing
with CPDFView
to switch out of edit mode. To save the changes, utilize commitEditing
to save the modified document.
swift
if pdfView.isEdited() == true {
DispatchQueue.global().async {
pdfView.commitEditing()
DispatchQueue.main.async {
pdfView.endOfEditing()
}
}
}
objective-c
if (pdfView.isEdited) {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[pdfView commitEditing];
dispatch_async(dispatch_get_main_queue(), ^{
[pdfView endOfEditing];
});
});
}