Last active
August 29, 2015 14:05
-
-
Save deezaster/dc50912d0fbcbd1ec885 to your computer and use it in GitHub Desktop.
Open URL
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
func jumpTo(URLString:String?) { | |
if let URL = NSURL.URLWithString(URLString!) { | |
UIApplication.sharedApplication().openURL(URL) | |
} | |
} | |
func emailTo(URLString:String?) { | |
if let URL = NSURL.URLWithString(URLString!) { | |
// "mailto:%@?subject=%@&body=%@" | |
let email = "mailto:\(URL)" | |
jumpTo(email) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment