title: Cannot assign value of type '(String?, Bool, [AnyObject]?, NSError?) -> ()' to
body: <p>After I update Xcode Version 8.0 (8A218a) swift 3, I got this error</p>
  
  <blockquote>
    <p>Cannot assign value of type '(String?, Bool, [AnyObject]?, NSError?) -> ()' to type 'UIActivityViewControllerCompletionWithItemsHandler?'</p>
  </blockquote>
  
  <pre><code>activityview.completionWithItemsHandler = {(activityType: String?, completed:Bool, returnedItems:[AnyObject]?, error: NSError?) in
              if !completed {
                  print("cancelled")
                  return
              }else{
                  complele()
              }
  
          }
  </code></pre>
  
  <p>I have been following this <a href="https://stackoverflow.com/questions/32598745/cannot-assign-a-value-of-type-string-bool-anyobject-nserror-void-to">Cannot assign a value of type &#39;(String!, Bool, [AnyObject]!, NSError!)-&gt;Void to a value of type UIActivityViewControllerCompletionWithItemsHandler?&#39;</a></p>
  
  <p>But i still got the error message.</p>
  
  <p>It works well in previous version 7.3.1 swift 2.</p>