Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Xcode 9 , Swift 4
- @IBAction func btnScreenshotTapped(_ sender:UIButton?) {
- let image = self.screenshot()
- let url = "https://sanomind.com"
- let vc = UIActivityViewController(activityItems: [url,image], applicationActivities: nil)
- vc.completionWithItemsHandler = {(activityType, completed, returnedItems, activityError) in
- if let error = activityError {
- print("\n\n\t##ActivityError: \(error)")
- }
- }
- present(vc, animated: true)
- }
- //THIS PRESENTS UIACTIVITYVIEWCONTROLLER PROPERLY BUT WHEN I TAP ON ANY OF ACTIVITIES IT USES ONLY TEXT OR IMAGE
- //SO WHAT SHOULD I DO?
Add Comment
Please, Sign In to add comment