title: IOS swift how to know when activityViewController has been successfully used
body: <p>I have a tableView that utilizes the <code>UIActivityViewController</code> so users can share content on other 3rd party networks Facebook, twitter, text message etc. I have a function called <code>IncreaseShareByOne()</code> and it's purpose is to count the number of times that something has been shared . My problem is that right now that function fires of every time the <code>UIActivityViewController</code> is clicked . Is there someway that I can find out if a user really shared something so that  I can use that function correctly ? becomes sometimes you open the <code>UIActivityViewController</code> and decide not to share anything so I want to catch and not use that function. I am new to swift and am using version 3 . </p>
  
  <pre><code>func sharedShareAction(controller: UIViewController, sender: UIButton) {
  
      controller.present(activityViewController,animated: true,completion: nil)
      IncreaseShareByOne()
  }
  </code></pre>