Created
October 7, 2016 17:48
-
-
Save DonMag/7d2b991567d89b8cb041228914b06bfb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| activityViewController.completionWithItemsHandler = { | |
| (activityType, completed, items, error) in | |
| guard completed else { print("User cancelled."); return } | |
| print("Completed With Activity Type: \(activityType)") | |
| if activityType == UIActivityTypePostToTwitter { | |
| // do something | |
| } else if activityType == UIActivityTypePostToFacebook { | |
| // do something else | |
| } | |
| } | |
| self.presentViewController(activityViewController, animated: true, completion: nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment