Basic example for sharing text or image with UIActivityViewController in Swift
<p>I started my search by wanting to know how I could share to other apps in iOS. I discovered that two important ways are </p>

<ul>
<li><code>UIActivityViewController</code></li>
<li><code>UIDocumentInteractionController</code></li>
</ul>

<p>These and other methods are compared in <a href="https://stackoverflow.com/a/20042701/3681880">this SO answer</a>. </p>

<p>Often when I am learning a new concept I like to see a basic example to get me started. Once I get something basic set up I can modify it how I like later. </p>

<p>There are many SO questions related to <code>UIActivityViewController</code>, but I couldn't find any that were just asking for a simple example. Since I just learned how to do this, I will provide my own answer below. Feel free to add a better one (or an Objective-C version).</p>