title: How do i add this sharing button? IOS8 with swift
body: <p>I want there to be a button in my app, that when it is pressed, this(See image below) Pops up. How do i do that? I don't want to create a custom sharing extion, i just want the default one? What code do i use? All the tutorials online are in objective-c. Please give an answer in swift.</p>
  
  <p>Image: <a href="http://9to5mac.com/2014/06/30/hands-on-1password-beta-shows-off-ios-8s-touch-id-extensions-apis-video/#jp-carousel-330420" rel="nofollow">http://9to5mac.com/2014/06/30/hands-on-1password-beta-shows-off-ios-8s-touch-id-extensions-apis-video/#jp-carousel-330420</a></p>
  
  <p>Here is my code so far, but i get an error that UIBarButtonItem Is not convetable to UIVIew Why? The action is connected to a navigation bar button item?</p>
  
  <pre><code>@IBAction func ActionButton(sender: UIBarButtonItem) {
  
      let firstActivityItem = "Text you want"
      let secondActivityItem : NSURL = NSURL(string: "http//:urlyouwant")!
      // If you want to put an image
      let image : UIImage = UIImage(named: "TALogo")!
  
      let activityViewController : UIActivityViewController = UIActivityViewController(
          activityItems: [firstActivityItem, secondActivityItem, image], applicationActivities: nil)
  
      // This lines is for the popover you need to show in iPad
      activityViewController.popoverPresentationController?.sourceView = (sender as! UIBarButtonItem)
  
      // This line remove the arrow of the popover to show in iPad
      activityViewController.popoverPresentationController?.permittedArrowDirections = UIPopoverArrowDirection.allZeros
      activityViewController.popoverPresentationController?.sourceRect = CGRect(x: 150, y: 150, width: 0, height: 0)
  
      // Anything you want to exclude
      activityViewController.excludedActivityTypes = [
          UIActivityTypePostToWeibo,
          UIActivityTypePrint,
          UIActivityTypeAssignToContact,
          UIActivityTypeSaveToCameraRoll,
          UIActivityTypeAddToReadingList,
          UIActivityTypePostToFlickr,
          UIActivityTypePostToVimeo,
          UIActivityTypePostToTencentWeibo
      ]
  
      self.presentViewController(activityViewController, animated: true, completion: nil)
  
  
  
  }
  </code></pre>