Created
July 4, 2012 10:35
-
-
Save inonb/3046652 to your computer and use it in GitHub Desktop.
[iOS] 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
| // SafariでURLを開く | |
| NSURL *urlSafari = [NSURL URLWithString:@"https://twitter.com/"]; | |
| [[UIApplication sharedApplication] openURL:urlSafari]; | |
| // Mailでメールを送る | |
| NSURL *urlMail = [NSURL URLWithString:@"mailto:[email protected]"]; | |
| [[UIApplication sharedApplication] openURL:urlMail]; | |
| // アプリのurlスキーマを開く | |
| NSURL *urlApp = [NSURL URLWithString:@"music:"]; | |
| [[UIApplication sharedApplication] openURL:urlApp]; | |
| // 電話をかける | |
| NSURL *urlTel = [NSURL URLWithString:@"tel:09012345678"]; | |
| [[UIApplication sharedApplication] openURL:urlTel]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment