title: Using Markup via UIDocumentInteractionController
body: <p>I am trying to support Apple's Markup of PDFs via <code>UIDocumentInteractionController</code> for files in my Documents folder on iPad. I want the documents edited in-place, so my app can load them again after the user is finished. I have set the <code>Info.plist</code> options for this, and the in-place editing does seem to work. Changes are saved to the same file.</p>
  <p>When I bring up the <code>UIDocumentInteractionController</code> popover for the PDF, I am able to choose &quot;Markup&quot;, which then shows the PDF ready for editing. I can edit it too. The problem is when I click &quot;Done&quot;: I get a menu appear with the options &quot;Save File To...&quot; and &quot;Delete PDF&quot;. No option just to close the editor or save.</p>
  <p>The frustrating thing is, I can see via Finder that the file is actually edited in-place in the simulator, and is already saved when this menu appears. I just want the editor to disappear and not confuse the user. Ie I want &quot;Done&quot; to be &quot;Done&quot;.</p>
  <p><a href="https://i.stack.imgur.com/D6kBs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D6kBs.png" alt="The Done menu, which includes not direct &quot;Close&quot; or &quot;Save&quot; options." /></a></p>
  <p>Perhaps related, and also annoying, is that while the markup editor is visible, there is an extra directory added to Documents called <code>(A Document Being Saved By &lt;&lt;My App Name&gt;&gt;)</code>, and that folder is completely empty the whole time. Removing the folder during editing does not change anything.</p>
  <p>Anyone have an idea if I am doing something wrong, or if there is a way to have the Done button simply dismiss?</p>