Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. if SLComposeViewController.isAvailableForServiceType(SLServiceTypeFacebook){
  2.  
  3. var facebookSheet:SLComposeViewController = SLComposeViewController(forServiceType: SLServiceTypeFacebook)
  4.  
  5. facebookSheet.setInitialText("Vea Software! :D")
  6.  
  7. self.presentViewController(facebookSheet, animated: true, completion: nil)
  8.  
  9. } else {
  10.  
  11. var alert = UIAlertController(title: "Accounts", message: "Please login to a Facebook account to share.", preferredStyle: UIAlertControllerStyle.Alert)
  12.  
  13. alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil))
  14.  
  15. self.presentViewController(alert, animated: true, completion: nil)
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement