-
-
Save anjnkmr/b9537d5fbcd5deeb312533b15c488aea to your computer and use it in GitHub Desktop.
Social Sharing iOS Swift 2.3
This file contains 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
@IBAction func twitterTapped(sender: UIButton) { | |
SocialService.shared.shareWithTwitter(self, text: textView.text, url: nil, image: imageVIew.image, completion: shareCompleted); | |
} | |
func shareCompleted(result: SLComposeViewControllerResult){ | |
self.view.userInteractionEnabled = true; | |
if result == .Cancelled{ | |
//"Cancelled"; | |
} | |
else | |
{ | |
//"Completed"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For swift 3
https://gist.github.com/ranjankumarzonup/9f8797ad67af704789168c9b8ac5fc1e